Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2012
    Posts
    2

    Question Unanswered: data type mismatch in criteria expression

    hello there. new member here. I was following this access tip on making multiple labels:

    Microsoft Access tips: Printing a Quantity of a Label

    I went through all the steps 1-5 and it seems that I've misunderstood something. In my query I get a "data type mismatch in criteria expression" error.

    this is how I have my query set up:

    http://i46.tinypic.com/1zyhhqh.jpg

    and I'm using Access 2007

  2. #2
    Join Date
    Sep 2006
    Location
    Surrey, UK
    Posts
    995
    Provided Answers: 2
    What is the data type of tblCount.CountID?
    What is the data type of [Order Details].QTY?

    If I may offer some advice that will save you time and trouble down the line, you need to amend your database design. Try to avoid using non-alphanumeric characters in object names and field names - it makes your coding requirements harder and makes the code harder to read and understand. There are various strategies that you can adopt instead - underscores ("Order_Details"), mixed case ("OrderDetails") or camel case ("tblOderDetails"). Pick one that you like and use it consistently, and you'll have an easier time when you come to revisit a database's code after a period of not looking at it.
    10% of magic is knowing something that no-one else does. The rest is misdirection.

  3. #3
    Join Date
    Oct 2012
    Posts
    2
    weejas thanks for your help. I guess the data types of the 2 fields were different. I changed them both to long integer.

    thanks for the tips

  4. #4
    Join Date
    Sep 2006
    Location
    Surrey, UK
    Posts
    995
    Provided Answers: 2
    Glad I could help!
    10% of magic is knowing something that no-one else does. The rest is misdirection.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •