I have a query that filters data and places the results in several text boxes on a form. I want to take the numbers in those txtboxes and use them as criteria for a different query. How do you take data from a txt box and use it as criteria in a second query?
How do you use a text box for the criteria in query?
Collapse
X
-
Start up your query editor, include the fields you want to include. Go to the line saying criteria, on the field you wish to query by, Right click and select Build, then Forms, Find your form, find the textbox (You did give it a sensible name right?)
Click the far right where it should now say <Value>, and in the top view of the expression builder you should now see "Forms![frm_Comments]![tb_Comment] "
Where frm_Comments is the name of my form, and tb_Comment is the name of my textbox within that form.
Note that for such a query to run, the form MUST be open. -
Comment