Others

Fix Access SQL LIKE Queries Returning No Results

Algirdas JasaitisAlgirdas Jasaitis Nov 3, 2026 871 views

Question details

Users need to fix an issue where an Access SQL query using the LIKE operator fails to return expected matches.

Fix Access SQL LIKE Queries Returning No Results
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.
Before you start

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.

Solution 1Recommended

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.

1
Open your query in Design View

Right-click your query in the navigation pane and select 'Design View', or switch to 'SQL View' to see the raw code.

2
Locate the failing LIKE condition

Find the criteria section causing the issue, for example: Description LIKE "Blue*".

3
Insert the leading wildcard

Add an asterisk (*) before your search term so the criteria reads: Description LIKE "*Blue*".

4
Run the query

Click the 'Run' button (the red exclamation mark) in the Query Design ribbon to verify that the missing results are now returned.

Add a Leading Wildcard to Your SQL Query
Query Match Confirmed: Using the double wildcard method ensures your query remains flexible against dirty data and minor formatting errors without modifying the original table.
Free Microsoft Office alternative

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. 1. Visit the official website: Navigate to the WPS Office website to download the installer for your operating system.
  2. 2. Install the suite: Run the setup file and follow the quick installation prompts.
  3. 3. Open your files: Seamlessly open your existing .docx, .xlsx, and .pptx files directly in WPS Office.
Fully compatible with Microsoft Excel, Word, and PowerPoint file formats.Lightweight installation that runs smoothly on almost any device.User-friendly tabbed interface for managing multiple documents in a single window.Rich set of free PDF editing tools and built-in templates.
microsoft office alternative - 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.