Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Subsituting a Varialbe in a Forms! statement 1

Status
Not open for further replies.
Sep 10, 2002
150
US

Ok, I have a variable declared as a string. The string is a line of text which is the name of a field on another open form. It changes based on the user's input on a drop down menu. Here's what I have:

(the variable is decalred in a public area before this on click event):

var = dlookup("my field", "my table", criteria)
Forms!FrmName!**** = expression

now, I want the text from the variable to go where the ****'s are, as if I were typing the name of the field myself. I don't know if this is possible, but if so I would save me a lot of work. I have tried %'s, and _'s, as well as combinations of [] and so forth.
If this isn't clear enough, please let me know and I will try to clarify some more. Thanx!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top