Others

Fix Data Type Mismatch in Microsoft Access Criteria Expressions

Muhammad TalhaMuhammad Talha Nov 22, 2026 868 views

Question details

Identify and correct a data type mismatch in an Access criteria expression after upgrading a database.

Fix Data Type Mismatch in Microsoft Access Criteria Expressions
Product
Microsoft Access
Device & OS
not provided
Scenario
A database upgraded from Access 2010 to Access 2016 reports an error when a query or VBA expression runs.
Observed behavior
Access displays “Data type mismatch in criteria expression” when incompatible values or invalid criteria are evaluated.
Before you start

Note which query, form, or VBA action triggers the error and the values involved. Open the affected database in Access so you can inspect its table fields and query criteria.

Solution 1Recommended

Find and correct the mismatched criteria

Use this approach to locate the failing expression and match each criterion to its field type.

1
Locate the failing expression

Run the affected query from the Navigation Pane. If VBA triggers the error, open the VBA editor with Alt+F11 and use Debug or F8 to identify the failing line.

2
Check field data types

Open the relevant table in Design View and inspect the Data Type column. In the query's Design View, compare those types with the values used in criteria and joins.

3
Correct the criteria syntax

In the query design grid's Criteria row, use quotes for text, such as "123", no quotes for a numeric value such as 123, and date delimiters for dates, such as #01/31/2024#. Use Is Null to test for a missing value.

4
Check joins and retest

In Query Design, inspect each join and ensure the joined fields have compatible types; for example, an AutoNumber primary key normally pairs with a Number field whose Field Size is Long Integer. Save and run the query again.

Find and correct the mismatched criteria
Check VBA-built SQL: If VBA constructs the query, inspect the SQL string at the failing line as well as the types of the values inserted into it.
Free Microsoft Office alternative

Work with Office documents in WPS Office

WPS Office is a free, lightweight alternative for everyday documents, spreadsheets, and presentations. Its familiar interface and Office format compatibility make it easy to move existing files, but it does not fix Access database errors.

Open and edit Microsoft Word, Excel, and PowerPoint formats, including DOCX, XLSX, and PPTXReview spreadsheet data in WPS Spreadsheets using a familiar interfaceUse a free, lightweight office suite for everyday workMove existing Office documents into a familiar workspace
microsoft office alternative - wps office

Frequently Asked Questions

Why does Access report a data type mismatch after an upgrade?

A query or VBA expression may compare incompatible types or use invalid criteria syntax. Find the failing query or VBA line, then check the field types and values on both sides of the expression.

How should I enter a date in an Access query criterion?

In the query's Design View, enter a date literal between hash marks in the Criteria row, such as #01/31/2024#. Make sure the field being compared has a Date/Time data type.

How do I check for empty values in an Access query?

In the field's Criteria row in Query Design, enter Is Null. A Null value is not the same as an empty text string.

Should I restore the Access 2010 Object Library reference?

Not unless you have confirmed the reference is responsible. In the VBA editor, check Tools > References for missing or relevant references, and investigate the query or code first.