How to Query Text Containing Specific Characters Like (B) in Microsoft Access
Question details
The user needs to filter records in a database query where a specific field contains a target string as part of a longer text value, rather than returning only exact matches.

- Product
- Microsoft Access
- Device & OS
- not provided
- Scenario
- Filtering records using a text query
- Observed behavior
- Using the literal criterion '(B)' only returns records whose entire value is exactly '(B)', ignoring records that contain '(B)' within a longer string.
Ensure your database table is open in Design View and you have identified the specific text field you want to apply the filter to.
Use the 'Like' Operator with Asterisk Wildcards
Applying the wildcard operator allows Access to match a specific string anywhere within a larger body of text.
In Microsoft Access, the asterisk (*) acts as a wildcard that represents any sequence of characters. By placing an asterisk before and after your search term, you instruct the query to find that term regardless of what comes before or after it.
Open your Microsoft Access database, right-click the query you want to modify in the Navigation Pane, and select 'Design View'.
Find the column for the text field you want to filter within the query design grid at the bottom of the screen.
In the 'Criteria' row for that field, type Like "*(B)*". The asterisks act as wildcards to represent any number of characters before and after your target text.
Click the 'Run' button (the red exclamation mark icon) in the Query Setup group on the ribbon to view your filtered results.

Looking for a reliable Microsoft Office alternative?
While Microsoft Access is a specialized database tool, WPS Office provides a robust, free, and lightweight suite for all your document, spreadsheet, and presentation needs. Enjoy high compatibility with standard office formats without the heavy subscription fees.

Frequently Asked Questions
Can I use wildcards to find text that ends with a specific character?
Yes. To find text that ends with '(B)', you would use the criterion Like "*(B)" by placing the asterisk only at the beginning.
Why isn't my query finding records with square brackets?
In Access, square brackets [] are often used to designate field names or character lists. If your target text involves square brackets, you may need to enclose them in brackets, like Like "*[[]B[]]*", to treat them as literal characters.
Does this wildcard search work in SQL View?
Yes, the syntax LIKE '*(B)*' works perfectly in Access SQL View. Note that if you are querying the database using ADO or SQL Server compatibility mode, you should use the percent sign (%) as the wildcard instead of the asterisk (*).




