Fix Data Type Mismatch in Microsoft Access Criteria Expressions
Question details
Identify and correct a data type mismatch in an Access criteria expression after upgrading a database.

- 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.
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.
Find and correct the mismatched criteria
Use this approach to locate the failing expression and match each criterion to its field type.
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.
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.
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.
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.

Review query parameters and Access references
Check these settings if the criteria look correct but the error persists after the upgrade.
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.

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.




