Control tip text

Prince

Registered User.
Local time
Today, 19:22
Joined
Oct 2, 2003
Messages
29
Good Morining

I have created form from Query. It contains several fields from different tables. here is the question:
How to make the control tip text displays the source of the field(table name).

Thanks for any help
 
Out of interest, why would you want to do this? Wouldn't it be more logical to set the ControlTipText to information regarding the field from the form's point of view?
 
Hello Mile-O-Phile
I actually I don't need to display the source of the field. I will actually display some calculations about the field. But If I know how to display the source I will be able to do what I need.
 
Put a DLOOKUP formula in the tip box, searching on the Primary Key found in, I presume, a textbox on your form.

Code:
=DLookUp("SearchField","TblName", _
"CriteriaField='" & [Forms]![FormName].[TxtKeyID] & "'")
Regards,
Tim
 
Like Mike it seems a little baffling to me too. But, then with your question , use the querydef object if the form's recordsource is a saved query and use

currentdb.querydefs(me.recordsource).fields(textbox. controlsource).sourcetable

This will provide u with the sourcetable.:cool:
Look into querydef VBA-help for sample code and further explanation
 

Users who are viewing this thread

Back
Top Bottom