Dynamic Control Tip Text

G

Guest

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

Similar Threads

Variable control tip text 3
Control Tip 1
Control Tip Text 6
Control Tip 4
using the control tip 8
control tool tip 2
Control Tip Text 3
control tip text 2

Top