File Repair
Quick Fixes for Excel ‘Data Source Reference Not Valid’ Issue
August 8, 2025| 7 min read
Summary: When working on the Access database, you can encounter the “Type mismatch in Expression” error. It can occur while creating queries and importing and exporting data from/to external sources. This article will discuss the causes behind this error and the troubleshooting solutions to resolve this error. In case the error occurs due to corruption in database, you can use the Access database repair tool mentioned in this article to repair the database file quickly.
Free Download 100% SecureThe Access error 3615 – Type Mismatch in the Expression error indicates that the application fails to match an input value to the expected data type value. The error can appear when you create a table relationship in Access or use a join to the queries. It usually occurs if there are incompatible data types. You can get this error in the following scenarios:
This error can occur if you try to establish a relationship in two tables with mismatched datatypes. There are many other reasons that may lead to this error, such as:
In Access, data type mismatch in criteria expression error can occur if there is a dollar sign ($) in the specified criteria for a currency field in the database. You can try removing the dollar sign to fix the issue. If the problem is not resolved, then follow the below methods:
The error 3615 - Access datatype mismatch in criteria expression can occur when attempting to establish a relationship between two tables using incompatible datatype in the fields. Ensure you have compatible datatypes in the tables of the database files. For example, if you have two tables in the Access database: “Customer” and “Order.” The field ID in the “customer” table and Order ID in the “Orders” table are set as Autonumber datatype. When trying to establish a relationship between two tables, the Access application reads these autonumber datatypes as distinct datatypes. When the Autonumber datatype is set in the table field, it automatically generates a unique, sequential number for its table, leading to a mismatch. You can use a common data type, such as a number, instead of the Autonumber.
Here are the steps to change the datatype in Access:
You can also check the table relationships. The table relationships window can help you identify the issues related to data type discrepancies between linked fields and relationships. To open the Relationships window, follow the below steps:
The “Type mismatch in expression” error can also occur when running queries (SQL-specific query, parameter query, action query, or crosstab query) in the database. It usually appears when you use incorrect syntaxes or if the joining fields contain wrong data types. Make sure you’re using the same data types in the fields. You can check the joined fields in your queries to troubleshoot the issue.
The “Datatype mismatch in expression” error in Access can occur due to incorrect variable and method declaration and mismatched datatypes in the variables in the VBA code. You can review the VBA code and try to fix the typos and other syntax issues. Here is how to do so:
You can get the “Datatype mismatch in criteria expression” error if the datatype discrepancies occurred due to corruption in the Access database file. If part of your MDB or ACCDB file gets damaged, you can repair it using the ‘Compact and Repair’ utility in MS Access. Here’s how to use this utility:
In case the Compact and Repair utility fails to repair the corrupted Access database, then the best option is to use a professional Access database repair tool, such as Stellar Repair for Access. The tool can fix highly corrupted Access database (.mdb or .accdb) file and recover all the objects while preserving the data integrity. The tool is compatible with all the MS Access versions, including MS Access 2019.
The datatype mismatch in criteria expression error can occur due to issues in the datatype associated with the fields and queries. You can follow the methods discussed in the article to troubleshoot the problem. If corruption in the database file causes this error, then try using Stellar Repair for Access. This tool can repair both .mdb and .accdb files and restore all the data in a new database file, keeping the original formatting.