Full Version: Dlookup on controltip text - do able?
UtterAccess Forums > Microsoft® Access > Access Forms
swaziman2
HI,
I am trying the following on the tooltip text but te results only shows the calculation as text , is it not possible to do this?
=dlookup([Tier],[tbltier],"TierID = 1")
thanks
Alan_G
Hi
Welcome to UA sad.gif
You can't do it directly in the Control Tip property of the textbox AFAIK. You'd need to use the Mouse Move event similar to this
CODE
Private Sub NameOfTextBox_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Me.NameOfTextBox.ControlTipText = DLookup("Tier","tbltier","TierID = 1")
End Sub
swaziman2
hi,
Thanks for getting back to me quick question , i would like to use this on a label , is there something similar to mouse move for a label?
thanks
Alan_G
Sadly no, labels don't have events. You could try putting a command button over the label with its Transparency property set to Yes and use the Mouse Move event of that. Not tried it but it might work.....
Alan_G
Quick update - just tried it on my machine and it works OK.......
swaziman2
thanks for all your help , i really appreciate it
Alan_G
No problem sad.gif
LPurvis
Just to note - labels don't have events when "attached" as child controls of another control (they raise the parent control's event instead).
HAs Alan as since tested for you - an unassociated label is just fine.
This is a "lo-fi" version of UA. To view the full version with more information, formatting and images, please click here.