I would like to be able to make a control tip show up when Me.Recordset.No Match is true. I have the code that does the testing already, but I haven't been able to find online how to makes it visible. This is purely an aesthetic thing so it is no big deal if it isn't possible. I've just seen it done on other programs and thought I would try to duplicate it.
Is there a way to make a control tip show up via VBA?
Collapse
X
-
Tags: None
-
This might be way to complex, but what about calling the MouseMove event in my code? I could change the text back and forth between "" and "Incorrect Loan Number" so that when called by the function it would read "Incorrect Loan Number" and when triggered by the mouse it would be "". I would have to have the function set it to "Incorrect Loan Number", show it, and then at the end of the code set it back to "". Is this the idea of a crazy person or is it worth a try? I haven't ever played with the MouseMove event so I'm not sure what all it does and I thought I would run it by you before I dive into it.Comment
-
It just suddenly came to me. I can just put a label that has my message and make it visible or not in my If/Then statement and make it a whole bunch easier.Comment
-
Seth,
Normally I use a text box as you've mentioned.... or better yet I set the focus back to the control with the invalid data and set the outline to Red from the normal color.
The tooltip text can be changed in real time by VBA and is something I have done upon occation; however, as Neopa points out, this only "pops" open during a mouse hover.
I have also used a modal popup form with a close command tripped by the timer event (and an OK button for those that read faster :) ) that warns of things. I like this in that I can set the timer to 0 which forces the user to click ok or the event will close the form in 5 or so seconds. I have done this a few different ways :).Comment
-
As I'm thoroughly inebriated ATM I will assume that Z's comment makes sense and answers your question Seth. Actually, I think I understand well enough to appreciate Z's comment actually makes sense. Otherwise, I feel safe to rely on him anyway.Comment
-
I would rather stay on the small side and keep with the label/textbox and not use the popup form. In this case I like the label better because it doesn't allow the user to click in it. I know that if you set Enable = false, it keeps you from being able to click in it, but then you loose the ability to control the looks of the control. I really wish that you could. I'm not sure why the looks are locked down when Enable is set to false on textboxes.Comment
-
Originally posted by SethSeth:
I'm not sure why the looks are locked down when Enable is set to false on textboxes.Comment
-
Comment
-
Originally posted by SethSeth:
I could do that but that still allows you to click in it.
As Z says, you could force it somewhere else, but that gets messy when trying to handle it taking control from causes other than a simple click. It's very difficult (and I've tried) to leave it without being even more confusing and 'wrong' than the problem you're trying to fix.Comment
-
NeoPa,
Respectfully, a single control properly formatted with a re-direct shouldn't cause too much confusion for the average user. Most will assume that the control isn't click-able.
The other option... and I know people don't like this....
Use a label control.
me.lblUserFeedB ack_AccountNumb er.caption = strMSG
You can set this to some generic message or set the visible property to false until needed. I actually use this control on the popup form and pass the message as an augment; however, I was trying to stay within the "normal" usage of things so I didn't suggest it at first.Comment
-
Originally posted by ZZ:
NeoPa,
Respectfully, a single control properly formatted with a re-direct shouldn't cause too much confusion for the average user. Most will assume that the control isn't click-able.
I suspect the Label option is still the best suggestion.Comment
-
Just a quick remark: If a textbox is BOTH disabled AND locked, you can format it any way you want. If a textbox is ONLY disabled, access will force some degree of formatting upon it.Comment
Comment