Microsoft Office Tutorials and References
In Depth Information
Prompting to filter data with parameters
Prompting to filter data with parameters
If you have a query that you regularly use with different criteria,
rather than changing the design of the query each time you
want to change the criteria or creating multiple copies of the
query with different criteria, you can define a set of parameters
so that when you open the query it automatically asks you to
enter values for these parameters and then displays the
appropriate data.
This type of query can be also used to provide data for a form
or report. This means that you can have a report that, when
opened, prompts for parameters before displaying the results.
Prompt with query parameters
1 Click Parameters.
2 Type a name for the parameter in square brackets. Ensure that
the name is different from any column name in your query, or the
parameter will not work.
3 Type a data type for the parameter, and click OK.
4 Type the parameter name without square brackets. IntelliSense will
assist you here.
5 When you open this query, type a value for the parameter to see
the restricted set of results.
TIP When viewing a parameterized query in Datasheet view,
pressing Shift+F9 enables you to enter different parameters and
then refresh to display the new results.
TIP You can add wildcards to search with parameters—for
example, by adding the criteria Like ‘*’ & [Enter Product Name]
& ‘*’. This is useful if you want to allow users to enter only a portion of
the field contents rather than requiring them to enter an exact match.
Search JabSto ::

Custom Search