Access Data Type Mismatch Error

Anonymous
2022-10-22T19:04:41+00:00

Hi I have an Access Database that has worked well in the past and it now has an error I can't figure out how to fix. The error reads "Data Type Mismatch in Criteria Expression"

Please help me figure this out.

Microsoft 365 and Office | Access | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments
{count} votes

28 answers

Sort by: Most helpful
  1. George Hepworth 22,215 Reputation points Volunteer Moderator
    2022-10-22T21:11:59+00:00

    When a process or query works for a long time and suddenly stops working, look first and new data. If there is an inappropriate datatype in the newer data being managed, it'll cause errors like this.

    For example, you are summing a couple of fields. Are all of the values in those fields non-null values?

    0 comments No comments
  2. Anonymous
    2022-10-22T23:36:28+00:00

    Please post the SQL view of the query, and the Datatypes of all the fields in the query. The screenshot of the query grid may be missing part of the relevant data. The SQL may look like Old Sumarian at this point, but some of us grew up in Old Sumaria and can read it easily. :-{)

    0 comments No comments
  3. Anonymous
    2022-10-23T00:15:15+00:00

    Thanks for trying to help.

    0 comments No comments
  4. Anonymous
    2022-10-23T07:23:32+00:00

    Maybe if you post an example file it is easier to understand and then help you.

    0 comments No comments
  5. Anonymous
    2022-10-23T21:23:57+00:00

    Please open the query in design view, and select SQL from the dropdown at the upper left. You'll get a window full of text which is the REAL query (the query grid is just a pretty nice but limited tool to build SQL strings). Copy and paste the SQL text to a message here. The original post error message is complaining about an incorrect datatype for a criterion - and the (portion of) the query grid doesn't show any criteria; I'd be they exist in the SQL.

    I've got several concerns about your datatypes. Short Text is the default and it's fine for text fields; but Dates should be in Date/Time fields, financial values like Sales Tax and Additional Charges should be Currency.

    0 comments No comments