Time to recycle the famous quote by Donald Rumsfeld
PetrAs we know, there are known knowns; there are things we know we know. We also know there are known unknowns; that is to say we know there are some things we do not know. But there are also unknown unknowns—the ones we don't know we don't know. And if one looks throughout the history of our country and other free countries, it is the latter category that tend to be the difficult ones.
In this case, its very easy to check the MSDN documentation for available properties in the Access object model.
You will not find a property to get the name of the control under the mouse. Code has to be used.
As I believe you already know, you can do all sorts of clever things using the cursor position on the screen and lots of VBA.
I believe others have provided such code here though as I said I haven't followed this thread in detail
In my own listbox example, I was able to identify the listbox item under the cursor using the Wizhook function and use that to display related data or images.
FWIW, you can also do some very simple code with mouse move events such as the VERY basic example attached.
Its not clever but its easy!
Apologies if anyone has already posted the same idea
Anyway I'm dropping back out of this thread now.
P.S. I think accesstos has shown the patience of a saint in this thread
Yes, many people have provided ways to do it in code. All work, all have been acknowledged by me, all contributors were duly thanked. The approach you demonstrate here works well. It is the same as the one Micron provided, which he says he got from Allen Browne's site. Thank you, but I already have numerous such things.Time to recycle the famous quote by Donald Rumsfeld
Petr
In this case, its very easy to check the MSDN documentation for available properties in the Access object model.
You will not find a property to get the name of the control under the mouse. Code has to be used.
As I believe you already know, you can do all sorts of clever things using the cursor position on the screen and lots of VBA.
I believe others have provided such code here though as I said I haven't followed this thread in detail
In my own listbox example, I was able to identify the listbox item under the cursor using the Wizhook function and use that to display related data or images.
FWIW, you can also do some very simple code with mouse move events such as the VERY basic example attached.
Its not clever but its easy!
Apologies if anyone has already posted the same idea
Anyway I'm dropping back out of this thread now.
P.S. I think accesstos has shown the patience of a saint in this thread
For the last couple dozen exchanges, I have been looking for documentation of this claim that what I want can't be done. You write that it is easy to check the MSDN documentation for this. I have not found it so easy. I have read a great deal of such documentation, such as https://docs.microsoft.com/en-us/off...tbox.mousemove, and see no mention of anything like this. But here is also no mention of some things that DO work. The fact that it is not specifically mentioned here as possible does not mean it's not possible.
The Access engine obviously know what control is being moused over, since it fires the events associated with the control. A click brings focus to the control, at which point the ActiveControl property switches to the control under the mouse. Access knows where the mouse is, since it switches focus to the control under the mouse. It does not seem unreasonable to me that this information might be exposed somewhere. I don't claim that it is - it now seems likely that it is not. But I see no proof.
And as for accesstos, repeatedly posting the same thing and ignoring the specific question I ask is not what I consider the patience of a saint. But I suppose my standards are different.
Yes, it is possible, dynamically.
The modified database: MouseMoveOK.accdb is attached.
How it works:
- The MouveMove Call of any TextBox first goes to the m_txt_MouseMove() Event Procedure in the Class Module.
- Here, the MouseMove Event Property is assigned with the User-Defined Function: "=RunMouseOver('Text_Name')" with the TextBox Name as parameter.
- Subsequent MouseMove Calls the Function RunMouseOver() from the standard Module1 directly, with the TextBox Name as parameter and doesn't go to the Class Module MouseMove() subroutine.
- This way it works every time the form is open and move the mouse over the Text Boxes.
Thanks for this Apr.