Page 4 of 10PREVNEXT

Queries VI: Use wildcards in queries and parameters

Using the asterisk in a query


The asterisk is the most general wildcard. It can represent any combination of letters and numbers. Use it when you know part of a value, and the rest of the data — such as the length or pattern of the value — isn't important.

For example, say you need data for customers who own their businesses, but some of the owners are listed as "owner/operator". If you use an explicit criteria such as owner, your results will match that criteria exactly. But if you add an asterisk to your criteria (owner*), the results will include "owner/operator."

Callout 1 Open your query in Design view, and in the Criteria row of the field you want to use, add one or more asterisks. You can place them inside your criteria, or on either end.
Callout 2 Press ENTER. Notice that Access adds the Like operator, and surrounds your criteria with quotation marks. You can add the operator and quotation marks yourself, but it's easiest to let Access do it for you.
Callout 3 Run your query to see if it gives you the correct data. If not, move the asterisk to another place in your criteria, or try another wildcard.
Page 4 of 10PREVNEXT