X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
   Reply to this topicStart new topic
> Mousemove, Access 2010    
post Nov 21 2017, 05:35 AM

Posts: 142
Joined: 10-August 17

HI UA Nation,

Could you please tell me how to highlight the TextBox background whileI am Moving the mouse over it.

Thank you
Go to the top of the page
post Nov 21 2017, 10:40 AM

UtterAccess Editor
Posts: 18,137
Joined: 29-March 05
From: Wisconsin


To add to what ridders has already suggested...

You aren't going into much detail about what you're trying to accomplish. For example, do you want the textbox highlight to go away when you move the mouse away from the textbox? If so, you'll want another bit of code in the Detail section's MouseMove event (or whichever section the textbox is located in) that changes the textbox background color to something else to make it appear to no longer be highlighted.

Another option would be to set the background color of the textbox to a color that makes it appear to be highlighted in the first place. Then, set the .BackStyle property to 1 in the MouseMove event for the textbox and to 0 in the MouseMove event for the section containing the textbox.

Hope this helps,


(;,;) Li'l Cthulu says: Please talk about what you're trying to do, as well as how you're doing it.
Changing your real table name to "Table1" and your real form name to "Form1" in your posts makes it more difficult to understand what's going on, not easier.
Guidelines for Posting Questions
Go to the top of the page
post Nov 21 2017, 02:48 PM

Posts: 264
Joined: 7-August 12
From: BC, Canada

My 2c is that because there is no MouseOut event, therefore you can't make this work reliably enough in Access. Yes, you can handle MouseMove over the detail section--and over other controls--but that's a hack (IMO), because all you can do is HOPE the mouse moves slow enough for the detail section--or some other control--to fire its own MouseMove and undo your change, but IMO it's too easy for this approach to fail.

What I think matters more is to highlight the control that has the focus, and this is way easier to do--and 100% reliably--with conditional formatting.

Just my 2c,

| Mark Klein | Access 2010 | Windows 10 | Visual Studio 2013
Go to the top of the page
post Nov 21 2017, 11:41 PM

Posts: 142
Joined: 10-August 17

Hi Dennis,

Thanks for all, It's done thumbup.gif
Go to the top of the page
post Nov 28 2017, 04:13 PM

Posts: 558
Joined: 31-October 10
From: Birmingham, Alabama

Just additional information for others looking into this ...

Much like ridders, I too have used mousemove events to simulate "on hover" events for a number of years. It works, but using it as such is at best a workaround for not having an "on hover" event.

In my experience, using mousemove in this manner yields pretty consistent performance, but it isn't flawless. (e.g. performance can be a bit lagging at times or more rarely even fail to pick up that the mouse as moved away)


Go to the top of the page

Custom Search
RSSSearch   Top   Lo-Fi    23rd February 2018 - 07:30 AM