Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / November 2006

Tip: Looking for answers? Try searching our database.

mouse hover event

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Tim A - 15 Nov 2006 01:19 GMT
I'd like to display some pop up information to a user when the mouse "hovers"
over a text box.  I'd also like the information to disappear when the user
moves the mouse.  I haven't done this in access before.  I can imagine
something like a mouseover event with a timer.

Thank you
Rick Brandt - 15 Nov 2006 01:52 GMT
> I'd like to display some pop up information to a user when the mouse
> "hovers" over a text box.  I'd also like the information to disappear
> when the user moves the mouse.  I haven't done this in access before.
> I can imagine something like a mouseover event with a timer.
>
> Thank you

Access controls have this built in.  Look for the ControlTip Text property.

Signature

Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt   at   Hunter   dot   com

Tim A - 15 Nov 2006 12:19 GMT
Thanks Rick.  I should have been more clear.  For the information I need to
display I will have to execute some code to look up info from a table based
on the info in that particular text box control.  I will have to use this
same function on 200+ text box controls on this form.

Thanks again !!!

t.

> > I'd like to display some pop up information to a user when the mouse
> > "hovers" over a text box.  I'd also like the information to disappear
[quoted text clipped - 4 lines]
>
> Access controls have this built in.  Look for the ControlTip Text property.
Rick Brandt - 15 Nov 2006 12:40 GMT
> Thanks Rick.  I should have been more clear.  For the information I
> need to display I will have to execute some code to look up info from
> a table based on the info in that particular text box control.  I
> will have to use this same function on 200+ text box controls on this
> form.

Access forms don't have the nice MouseOver and MouseOff event that web pages do.
They have MouseMove instead.  The difference (and problem) is that it fires
constantly, once for every pixel change of the mouse while you are over the
control, not just once moving over the control.

Since it is rare that one would actually want their code to fire continuously
like that you have to put hacks in to try to limit the code to running only once
until the mouse cursor leaves the control while still running again should the
cursor return.  In my experience this is difficult to achieve without a lot of
problems and/or screen flicker.

Stephen Lebans (I think) has an advanced mouse-over example that you might want
to look at for ideas.

Signature

Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt   at   Hunter   dot   com

Tim A - 15 Nov 2006 16:38 GMT
Thinking out loud.  Is it possible to programatically define the
controltip.text property during the formload event?  That could end up being
the way to go for me because all of the text boxes are filled out for the
user during the load.

t.

> > Thanks Rick.  I should have been more clear.  For the information I
> > need to display I will have to execute some code to look up info from
[quoted text clipped - 15 lines]
> Stephen Lebans (I think) has an advanced mouse-over example that you might want
> to look at for ideas.
Klatuu - 15 Nov 2006 17:02 GMT
Yes, see my previous post.

> Thinking out loud.  Is it possible to programatically define the
> controltip.text property during the formload event?  That could end up being
[quoted text clipped - 22 lines]
> > Stephen Lebans (I think) has an advanced mouse-over example that you might want
> > to look at for ideas.
Klatuu - 15 Nov 2006 15:38 GMT
There is no reason you couldn't use a single function for all the text boxes.
Just pass the name of the control to the function and use it to determine
what text you need:

Private Function SetText(strCtlName As String) As Boolean
Dim ctl As Control
Dim strText as String

   Set ctl = Me.Controls(strCtlName)
   
   strText = 'Do the logic to select the text

   ctl.ControlTipText = strText
End Function

> Thanks Rick.  I should have been more clear.  For the information I need to
> display I will have to execute some code to look up info from a table based
[quoted text clipped - 13 lines]
> >
> > Access controls have this built in.  Look for the ControlTip Text property.
Tim A - 15 Nov 2006 17:05 GMT
This should work.  I can set all the text box control tips during formload
using the syntax you provided.  Thank you!

t.

> There is no reason you couldn't use a single function for all the text boxes.
>  Just pass the name of the control to the function and use it to determine
[quoted text clipped - 28 lines]
> > >
> > > Access controls have this built in.  Look for the ControlTip Text property.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.