Parameter queries are not just for querying records when you know exactly what you’re looking for. You can also use them to search for records that contain any string of characters, anywhere in a field. Rather than having users remember how to use wildcards, you can create a parameter query that allows them to enter just the string of characters they’re looking for. Follow these steps:
- Open the query in Design mode.
- Click in the Criteria cell of the name field and enter the following, as shown in Figure A:
Like"*"&[Enter character string]&"*"
- Close and Save the query.
Now let’s say you want to find the balance of a company whose name includes the word Music. When you run the query, you would enter Music in the parameter query dialog box, as shown in Figure B.
As you can see in Figure C, even though Music appears in the middle of the name, Access is still able to find the record.