Results 1 to 11 of 11
  1. #1
    RMittelman is offline Advanced
    Windows 10 Access 2016
    Join Date
    Dec 2010
    Location
    Simi Valley, CA
    Posts
    211

    Custom Control Tip Text in Continuous Form on Hover

    I would like to have a control tip text come up when hovering over a continuous form (or subform). So far I've only been able to get the same text to pop up for all records on the continuous form. What I want is to have a tip come up which is pertinent to the specific record I'm hovering over. This is WITHOUT the sub form having the focus.



    I know there is a way to do this using the Windows API, but I can't remember it, and can't seem to find that anywhere. This is similar to being able to scroll a scrollable control when it does not have focus, simply by having the mouse cursor hovering over it.

    Can anybody lead me to the answer for this?

    Thanks...

  2. #2
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    To be clear, the tip is record related and not field related? Record related sounds odd, so I suspect there are not that many records.
    Never tried, but what comes to mind is that you'd need a PK in each record for sure, and a related table of messages where those PK's are in the message table as foreign keys. You'd get the message based on the record id. I suspect that you'd also use the mousemove over as many form controls as is required. The good thing is that field values in specific records can be retrieved from a continuous form. The bad news might be that the record has to be the selected record.

    Whenever I tried using tip text (albeit not per record) I always found it to be temperamental, and I imagine that is API related.
    Probably not what you're wanting, but hey, after 23 views and no answer, I figure I had nothing to lose...
    Last edited by Micron; 05-19-2019 at 09:23 PM. Reason: clarification
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  3. #3
    RMittelman is offline Advanced
    Windows 10 Access 2016
    Join Date
    Dec 2010
    Location
    Simi Valley, CA
    Posts
    211
    Quote Originally Posted by Micron View Post
    To be clear, the tip is record related and not field related? Record related sounds odd, so I suspect there are not that many records.
    Never tried, but what comes to mind is that you'd need a PK in each record for sure, and a related table of messages where those PK's are in the message table as foreign keys. You'd get the message based on the record id. I suspect that you'd also use the mousemove over as many form controls as is required. The good thing is that field values in specific records can be retrieved from a continuous form. The bad news might be that the record has to be the selected record.

    Whenever I tried using tip text (albeit not per record) I always found it to be temperamental, and I imagine that is API related.
    Probably not what you're wanting, but hey, after 23 views and no answer, I figure I had nothing to lose...
    Thanks for the quick answer, but from that answer I see that I didn't adequately state the issue.

    The form and sub form are working just fine, the appropriate linked records are appearing on the sub form, which is a continuous form. The information that I want to appear in the tool tip is already present in each record in the sub form. I'm picturing having a "?" type image on the sub form records, and when the mouse is hovered over that, the tool tip will come up. I know records or detail sections of forms don't have a mouse move event, that's why I'm willing to use a control on each record to trigger the event.

    The issue is more how I get the individual record that I'm hovering over to be recognized as "the" record to use for calculating the tool tip text, without actually giving the sub-form record the focus. So the challenge is 2-fold:


    • Recognize the hovered-over record is the one that I want to supply the value
    • Be able to scroll the sub-form without clicking on it, just by virtue of the fact that the mouse is hovering over the sub-form.


    I know this is doable using Windows APIs, I just don't remember how to do this.

    By the way, I tried putting code in mouse move event of a label control in the sub-form records. At this point, I just tried to have it debug.print the field value I wanted. Since the first record in the sub-form is selected by default (has the record selector arrow in the left margin), that's the record whose field value is debug.printed, regardless of which record I'm hovering over. So I need the event to know which record is being hovered over, and get its value. Pretty sure I need the Windows API for this.
    Thanks...
    Last edited by RMittelman; 05-20-2019 at 10:40 AM. Reason: Further clarification

  4. #4
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    I'm picturing having a "?" type image on the sub form records, and when the mouse is hovered over that, the tool tip will come up.
    If I understand, what I find fascinating about this is that the mouse pointer is right there over the ? control on any given record, but you want to get a tip without that record being activated or the ? control being clicked on. It's one click??
    I know records or detail sections of forms don't have a mouse move event,
    How did you arrive at that conclusion? Form and report detail sections have mouse events. Records are not by themselves a control, but the record is made up of 1 or more controls showing data, and the controls have mouse events. Maybe I'm misinterpreting your statement.

    If you can ever find where the info is for an API that does what you want, I hope you post a link to it here. The barrier I see is that you still have the problem of no (or the wrong) active record, which I would think would prevent getting any info from a hovered over record.

  5. #5
    RMittelman is offline Advanced
    Windows 10 Access 2016
    Join Date
    Dec 2010
    Location
    Simi Valley, CA
    Posts
    211
    Thanks again for replying. I was mistaken about the mouse move event, the detail section does indeed have that.
    I think you have it right. On the mouse move event, I want to use VBA to set the control tip text for the "?" image, WITHOUT making that record active. I know this can be done with list boxes, there are several utilities that can know which list box item you are hovering over. Here is one. I just need to find any way of doing this with a continuous form. No clicking on anything.

  6. #6
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    Interesting. Isladogs is a member here; suggest you pm him and ask if it's adaptable to your need. After reading that, I'm guessing it's possible with a listbox because of being able to know the row height and from knowing the x y coordinates of the mouse event, calculate how many rows down the cursor is. Then use the index property of the listbox, which relates to the position of the row in the list. That would give you the record at the mouse position. However, I don't think a detail section has an index property, or any property that I can think of that would help. Again, if you find what you're looking for, I hope you post it here and mark this as solved when all done. I find it intriguing but an upcoming situation here means I will either soon be on reduced forum activity if any at all, so probably won't be able to explore this much in spite of my curiosity.

  7. #7
    RMittelman is offline Advanced
    Windows 10 Access 2016
    Join Date
    Dec 2010
    Location
    Simi Valley, CA
    Posts
    211
    Thanks Micron. I haven't completely checked Isladog's code, but it must also know which ListItem happens to be at the top of the visible portion of the list, in case it's been scrolled. Too much to keep track of. Probably I will change my requirement to clicking the "?" image instead of hovering over it. That would make things a lot easier. I can then popup a form which shows the hidden field values instead of using tooltip. Thanks a lot.

  8. #8
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    You're welcome. Too bad I don't know the solution for you issue, assuming there is one. However, clicking is not too onerous, is it? After all, the cursor would be over the pertinent ? control anyway. Somethings are not worth the extra work in terms of payback, and sometimes they don't transport from one user to another because of variables like screen resolution. Good luck with your db.

  9. #9
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    5,954
    Ron contacted me by email.
    I use mouse move events for various purposes including context related captions with form buttons and other controls.
    Screen resolution isn't an issue for me when using this type of code.
    In fact I use form resizing code with most of my apps specifically to work in different resolutions and monitor sizes.

    I intend to look into using mouse move with a continuous subform at some point over the next few days.
    Will report back after I've done so.
    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

  10. #10
    RMittelman is offline Advanced
    Windows 10 Access 2016
    Join Date
    Dec 2010
    Location
    Simi Valley, CA
    Posts
    211
    There may be a way to solve this, but as mentioned before, a single click isn't too bad. So I'm going back to the idea of clicking on a "?" image in my continuous form record and running code to pop up a zoom box.

    Thanks to all who replied...

  11. #11
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,737
    U R welcome. Considering the payback to effort ratio, that's what I'd do.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. "Y" position of a text box control on a continuous form
    By GraeagleBill in forum Programming
    Replies: 20
    Last Post: 02-18-2019, 06:07 PM
  2. Continuous form Combo box control
    By dinsey90 in forum Forms
    Replies: 4
    Last Post: 02-07-2018, 02:48 PM
  3. Control visibility on continuous form
    By GraeagleBill in forum Forms
    Replies: 4
    Last Post: 12-26-2014, 05:33 PM
  4. Replies: 1
    Last Post: 06-18-2014, 09:39 PM
  5. Calculated control on Continuous Form
    By Mtyetti2 in forum Forms
    Replies: 2
    Last Post: 03-25-2013, 05:13 PM

Tags for this Thread

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