Dynamic Control Tip Text

B

BillyJ

Is there anyway to change what is in the control tip text depending on what
record I'm looking at in a form? For instance, I have a form that lists the
names of a number of people spit out from a query. I would want their phone
number or other related information to show up in one of those little "hover
boxes", which would obviously change from record to record.

Any thoughts?

Thanks very much in advance.
 
D

Dave Peterson

Is this a userform that you've developed in the VBE?

If yes, then yep.

I don't know how you'd know what to base the change on, but this worked ok for
me--based on a button click and a random number.

Option Explicit
Private Sub CommandButton1_Click()
Dim SomeVar As Double
SomeVar = Rnd()
If SomeVar > 0.5 Then
Me.Label1.ControlTipText = "hi"
Else
Me.Label1.ControlTipText = "bye"
End If
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top