Parameter query for a combo box row source

  • Thread starter Thread starter JimP
  • Start date Start date
J

JimP

A query for a combo box on a form uses a value from a text box on the same
form. Can I refer to the text box without specifying the form name? e.g.

Currently I am using "Forms!Form1!Text1" - would like to use something like
"Forms!(Me.Name)!Text1"
 
No. If you use the criteria in the form, it must include the form name to
find the text box.

It might be possible to write a VBA function that returns the value of the
active text box on the active form, and then use the function in the
criteria of your query.

Alternatively, it might be better to avoid putting the criteria in the query
at all. Use the Filter of the form, or the WhereCondition of OpenReport.
 
Back
Top