Page 5 of 5 FirstFirst 12345
Results 61 to 65 of 65
  1. #61
    accesstos's Avatar
    accesstos is offline Expert
    Windows XP Access 2007
    Join Date
    Dec 2018
    Location
    Greece
    Posts
    551

    Quote Originally Posted by pdanes View Post
    ...then please stop...
    That's exactly I am going to do.

  2. #62
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,954
    Quote Originally Posted by accesstos View Post
    I feel lucky when I am in company with people that they knows what they don't know.
    Time to recycle the famous quote by Donald Rumsfeld
    As 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.
    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
    Attached Files Attached Files
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

  3. #63
    pdanes is offline Competent Performer
    Windows Vista Access 2007
    Join Date
    Sep 2019
    Posts
    208
    Quote Originally Posted by isladogs View Post
    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
    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.

    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.

  4. #64
    apr pillai's Avatar
    apr pillai is offline Competent Performer
    Windows 10 Access 2007
    Join Date
    May 2010
    Location
    Alappuzha, India
    Posts
    209
    Yes, it is possible, dynamically.

    The modified database: MouseMoveOK.accdb is attached.

    How it works:

    1. The MouveMove Call of any TextBox first goes to the m_txt_MouseMove() Event Procedure in the Class Module.
    2. Here, the MouseMove Event Property is assigned with the User-Defined Function: "=RunMouseOver('Text_Name')" with the TextBox Name as parameter.
    3. 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.
    4. This way it works every time the form is open and move the mouse over the Text Boxes.
    Attached Files Attached Files

  5. #65
    orange's Avatar
    orange is online now Moderator
    Windows 10 Access 2010 32bit
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716

Page 5 of 5 FirstFirst 12345
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Issues with change event of textbox
    By udigold1 in forum Programming
    Replies: 4
    Last Post: 03-27-2019, 08:39 AM
  2. Query with parameter from Form Textbox
    By Juan4412 in forum Queries
    Replies: 1
    Last Post: 07-10-2013, 02:33 PM
  3. Help with Onclick event to refresh textbox.
    By mikeone610 in forum Access
    Replies: 3
    Last Post: 02-07-2013, 03:58 PM
  4. Replies: 3
    Last Post: 05-07-2012, 12:17 PM
  5. How to call After update event to the textbox
    By pwalter83 in forum Forms
    Replies: 1
    Last Post: 12-20-2011, 11:16 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums