Query Criteria

  • Thread starter Thread starter Big Tony
  • Start date Start date
B

Big Tony

I would like to use the same criteria in multiple
queries, and be able to change that criteria in one
central place (like on a switchboard or a form,for
example). I would like to then be able to run these
multiple queries after having updated this one location
(I guess I am looking for something like a "named cell"
in excel, which I can refer to from multiple queries).

Does such a capability exist in Access?
 
Big said:
I would like to use the same criteria in multiple
queries, and be able to change that criteria in one
central place (like on a switchboard or a form,for
example).

Just create an unbound form with the necessary textbox(es). You can refer
to the entries in these textboxes in the criteria for your queries.

Forms!YourFormName!TextboxName
I would like to then be able to run these
multiple queries after having updated this one location
(I guess I am looking for something like a "named cell"
in excel, which I can refer to from multiple queries).

The form needs to be open when you run the queries. You can add buttons to
the form to open the query, or perhaps open a report based on your query.
 
I would like to use the same criteria in multiple
queries, and be able to change that criteria in one
central place (like on a switchboard or a form,for
example). I would like to then be able to run these
multiple queries after having updated this one location
(I guess I am looking for something like a "named cell"
in excel, which I can refer to from multiple queries).

Does such a capability exist in Access?

Certainly. Create an unbound Form - let's call it frmCrit - with as
many controls (textboxes, combo boxes, checkboxes, whatever is
appropriate). Let's call one of them txtCrit.

You can then use

=[Forms]![frmCrit]![txtCrit]

as a criterion in a query (or in multiple queries). So long as frmCrit
is open at the time, the query will retrieve whatever value the user
has entered into that control.
 
Back
Top