#1
  1. No Profile Picture
    Contributing User
    ASP Discoverer (100 - 499 posts)

    Join Date
    Oct 2007
    Posts
    160
    Rep Power
    22

    Access 2010 Web database - Query criteria


    In a very simple web database in Access 2010, I want to set a criteria for someone's name eg "Andrew". Typing those characters into the criteria box and clicking on Run brings up an error message "Data type mismatch in criteria expression". If I remove the criteria and run the query, it happily brings up the record with the name Andrew. I've tried putting an = sign in front but it makes no difference. Any ideas would be much appreciated. Thanks.
  2. #2
  3. Contributing User
    ASP Adventurer (500 - 999 posts)

    Join Date
    Jun 2011
    Location
    South Jersey
    Posts
    544
    Rep Power
    59
    What is the data type of the field you are searching. The error indicated that you are trying to use text criteria on a field that is not text. Make sure you're field is not a memo field. I do not believe you can use criteria on a memo data type.

    Can you post the SQL for your query?
  4. #3
  5. No Profile Picture
    Contributing User
    ASP Discoverer (100 - 499 posts)

    Join Date
    Oct 2007
    Posts
    160
    Rep Power
    22
    Many thanks for your response. You're right - the criteria had to be placed in the field that was being looked up. The datatype in the main table was "Lookup & Relationship", so I guess that's why it wouldn't accept the text in the criteria. This Access web database is another learning curve altogether! Thanks again for your help - greatly appreciated.

Similar Threads

  1. MS Access database and VB 2010
    By lkallas in forum Visual Basic Programming
    Replies: 0
    Last Post: August 28th, 2012, 05:30 PM
  2. 2010 Access Database HELP! Pretty Please and Thank You!
    By DoctorPDR in forum Microsoft Access Help
    Replies: 4
    Last Post: December 7th, 2011, 11:35 AM
  3. Incorporating Criteria in Access Query for report
    By chrisjack001 in forum Microsoft Access Help
    Replies: 1
    Last Post: February 22nd, 2011, 12:15 PM
  4. Access to MS Query, using criteria
    By mamaStone in forum Microsoft Access Help
    Replies: 2
    Last Post: August 23rd, 2006, 08:22 AM
  5. Passing criteria from VBA to an Access Query
    By Beagles in forum Microsoft Access Help
    Replies: 1
    Last Post: January 9th, 2006, 06:24 PM

IMN logo majestic logo threadwatch logo seochat tools logo