Hi, how can I dispaly variable values on the Control Tip
property of a cmdButton??
I tried with: ="Add an activity for " & Me!LblTitle & " on
& DateAdd("d", 1, Me!Dt"
But I only get the text displayed (not the actuall value
of LblTitle and Dt)..
Thx!
Not only can't you get this by inserting the expression directly in
the ToolTipText property, (it's a Text only property), but you have
miss-written the expression (you placed a " in the wrong place (after
Me!Dt) and didn't place one where it was needed (between the word on
and the & symbol).
Further, Me is a VBA keyword and cannot be used in an Access
expression, only in VBA code.
Question for you. What is type of control is [LblTitle]?
If it is a LABEL CONTROL you would need to refer to it's Caption
property ( & LblTitle.Caption &). If it is a TEXT CONTROL, then you
referred to it properly.
You can do this using code in some event.
Because it is in a code window, the use of the Me! keyword is
appropriate.
Let's use the MouseMove event.
[ControlName].ToolTipText = "Add an activity for " & Me!LblTitle & "
on " & DateAdd("d", 1, Me!Dt)
Will display "Add an activity for Jones on 3/2/2004".
I hope this has helped.