
Originally Posted by
chocobochick
You can create a query to reference user input from a form's controls. So as long as the tables, join relationships, and selected fields are always the same, you can save a single query that can change depending on the user's input.
For example, say your form is named "frmSelectReport", which has a textbox named "txtLastName" where the user can specify which last name to search for. In your saved query, you would place the line [Forms]![frmSelectReport]![txtLastName] (with all brackets) in the Criteria box for the last name field. Then whenever the query is executed (whether by itself or for a form or report), it will use the value of the txtLastName textbox (provided that the form is opened) as its criteria.