Fix Access SQL LIKE Queries Returning No Results
Question details
Users need to fix an issue where an Access SQL query using the LIKE operator fails to return expected matches.

- Product
- Microsoft Access
- Device & OS
- not provided
- Scenario
- Filtering data using SQL queries with wildcard searches on imported datasets.
- Observed behavior
- Queries using a trailing wildcard (e.g., LIKE "Word*") return no results despite the word being visually present at the start of the field, due to hidden nonprinting characters or leading spaces.
Check if your database table contains data recently imported from an external source, such as a CSV or Excel file, as these imports frequently introduce invisible leading spaces or formatting characters.
Add a Leading Wildcard to Your SQL Query
Modify your LIKE condition to include an asterisk (*) at the beginning of the search string to bypass any hidden leading characters.
When data is imported from external files, text fields often contain non-breaking spaces or invisible characters right before the first visible letter. A standard trailing wildcard search (LIKE "Blue*") expects 'Blue' to be the absolute first character in the string. By placing a wildcard before the word, you instruct Access to match the string anywhere within the field, effectively ignoring hidden spaces.
Right-click your query in the navigation pane and select 'Design View', or switch to 'SQL View' to see the raw code.
Find the criteria section causing the issue, for example: Description LIKE "Blue*".
Add an asterisk (*) before your search term so the criteria reads: Description LIKE "*Blue*".
Click the 'Run' button (the red exclamation mark) in the Query Design ribbon to verify that the missing results are now returned.

Use the Trim Function to Clean the Data
Apply the Trim() function to ignore leading and trailing spaces directly in the query criteria.
Looking for a Lightweight Office Suite? Try WPS Office
While Microsoft Access is a specialized database application, much of your daily work likely involves documents, spreadsheets, and presentations. WPS Office offers a free, highly compatible alternative to Microsoft Word, Excel, and PowerPoint, making it incredibly easy to manage your daily tasks without a costly subscription.
- 1. Visit the official website: Navigate to the WPS Office website to download the installer for your operating system.
- 2. Install the suite: Run the setup file and follow the quick installation prompts.
- 3. Open your files: Seamlessly open your existing .docx, .xlsx, and .pptx files directly in WPS Office.

Frequently Asked Questions
Why does an exact match work on one field but LIKE fails on another?
Exact matching on a clean field (like Item = "Towel") will succeed, but if the field you are searching with LIKE (such as a long Description field) contains hidden characters or formatting imported from another program, a query looking for the exact starting characters (LIKE "Blue*") will fail.
What is the best way to permanently remove hidden spaces from imported Access data?
You can permanently clean the data by running an Update Query. Update the specific field using the expression Trim([FieldName]) to strip standard leading and trailing spaces across the entire table.
Will using a leading wildcard slow down my Access database?
Yes, using a leading wildcard (LIKE "*Blue*") forces Access to perform a full table scan because it cannot effectively use indexes on that field. In large databases, this can result in slower query performance.




