Display Data Using ControlTip?

T

tkosel

Is there a way to use data from another control in a tool tip?
I have a field named [TimeStamp] which displays a calculated time interval.
(i.e. 5.27 hours ago.) I would like to create a control tip for this field
that would display the actual time that was 5.27 hours ago. I have a control
named [CollectTime] which is the actual date/time stamp used to calculate the
[TimeStamp] value. I don't want to normally display that field as part of
the record.

I tried using me.CollectTime and a bunch of variations in the controltip
text for the control named [TimeStamp] but all I got for the control tip was
"me.CollectTime". Can data be used in the control tip?
 
R

Rob Parker

You can do this via code in the form's Current event. Something like:
Me.TimeStamp.ControlTipText = "CollectTime: " & Me!CollectTime

I'm a little confused by your field/control terminology; in the expression
above, .TimeStamp must be the name of the control displaying the TimeStamp
field, and CollectTime must be the name of a field in the form's
recordsource. If CollectTime is displayed in a textbox named
txtCollectTime, and TimeStamp is displayed in a textbox named txtTimeStamp,
you could use:
Me.txtTimeStamp.ControlTipText = "CollectTime: " & Me.txtCollectTime


HTH,

Rob
 
T

tkosel

Rob,

Thanks for your help, sorry about my use of terminology. It wasn't very
good. Your hint helped me solve the issue. Thanks for your advice.

Rob Parker said:
You can do this via code in the form's Current event. Something like:
Me.TimeStamp.ControlTipText = "CollectTime: " & Me!CollectTime

I'm a little confused by your field/control terminology; in the expression
above, .TimeStamp must be the name of the control displaying the TimeStamp
field, and CollectTime must be the name of a field in the form's
recordsource. If CollectTime is displayed in a textbox named
txtCollectTime, and TimeStamp is displayed in a textbox named txtTimeStamp,
you could use:
Me.txtTimeStamp.ControlTipText = "CollectTime: " & Me.txtCollectTime


HTH,

Rob
Is there a way to use data from another control in a tool tip?
I have a field named [TimeStamp] which displays a calculated time
interval. (i.e. 5.27 hours ago.) I would like to create a control
tip for this field that would display the actual time that was 5.27
hours ago. I have a control named [CollectTime] which is the actual
date/time stamp used to calculate the [TimeStamp] value. I don't
want to normally display that field as part of the record.

I tried using me.CollectTime and a bunch of variations in the
controltip text for the control named [TimeStamp] but all I got for
the control tip was "me.CollectTime". Can data be used in the
control tip?
 

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