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-24T13:10:26+00:00

    There are records in that displayed group of records with nulls in different columns, such as Qty and Total. You are trying to Sum() on Qty and Total. If you exclude those records with Null in those fields (and any other fields with Null in one or more records), what happens?

    Do you know the technical importance of Nullin a relational database application? It is not the same as saying "blank".

    BTW: It looks like your data might be coming from an import file downloaded from a website selling items? If so, that might account for the non-normalized table design. On the other hand, specifying that in the original question would be helpful as a background to what you are trying to accomplish.

    0 comments No comments
  2. Tom van Stiphout 40,086 Reputation points MVP Volunteer Moderator
    2022-10-24T13:18:08+00:00

    PK = Primary Key, the index every table should have that indicates uniqueness of each row.

    0 comments No comments
  3. Anonymous
    2022-10-25T00:02:55+00:00

    Yes, I am importing a file I am getting from a website that I sell on.

    What I am trying to accomplish is to group and consolidate what parts I sold. Ex. If I sold multiple black tiles to different people, Qty 10 and Qty: 7, it would show that info like in row 3 with the total Qty and Price.

    0 comments No comments
  4. George Hepworth 22,215 Reputation points Volunteer Moderator
    2022-10-25T00:34:43+00:00

    "There are records in that displayed group of records with nulls in different columns, such as Qty and Total. You are trying to Sum() on Qty and Total. If you exclude those records with Null in those fields (and any other fields with Null in one or more records), what happens?"

    "Do you know the technical importance of Nullin a relational database application? It is not the same as saying "blank"."

    0 comments No comments
  5. Anonymous
    2022-10-25T01:07:24+00:00

    I'm not sure how to even test that.

    I deleted the rows down to a couple, and it didn't change anything.

    0 comments No comments