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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query Question

Status
Not open for further replies.

whodeycp

MIS
Oct 11, 2007
14
US
Is it possible to have an expression in a query be equal to the current value from a textbox on an open form?
 
Yes, in the Field: row, put in Forms!frmFormName!txtFieldName and it will add an Expr1: name to it.
 
You can do this from the Query Design view:
Under the field you want to compare/filter:
[OL][LI]Click in the Criteria box, and then click on the build button, or else, right-click in the box, and select build.[/LI]
[LI]In next screen, click the "=" option[/LI]
[LI]Next, click the plus sign next to "Forms" in the left box, choose your form (double-click)..[/LI]
[LI]In the middle box, find your control, and double-click it - it should show up now correctly in your top text box (the build window)...[/LI][/OL]

--

"If to err is human, then I must be some kind of human!" -Me
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top