Results 1 to 6 of 6
  1. #1
    sneupane is offline Novice
    Windows XP Access 2003
    Join Date
    Mar 2010
    Posts
    7

    Data Mismatch Error

    I have a created a query 'Andy' using Table 'work' and Table 'ItemIndex'.
    Common field 'Style' of both tables is inner joined.

    Fields style and component are strings

    Field in the query
    a. Style from table 'work'
    b. Component from the table 'ItemIndex'
    c. Blank: IIf(Left([ItemIndex]![Component],3)="ZSK" Or Left([ItemIndex]![Component],3)="ZBL",[ItemIndex]![Component],'Unknown')

    This gives me result I wanted.

    Now if I create a query using the query 'Andy' and set the criteria for field 'Blank' as "Unknown", then it gives me an error "Data type mismatch in criteria expression".
    How could I make this query running and what is the wrong thing I am doing?

  2. #2
    llkhoutx is offline Competent Performer
    Windows Vista Access 2007
    Join Date
    Jan 2010
    Location
    Houston, Texas USA
    Posts
    373
    Post your new query, it's not clear what you have done.

  3. #3
    sneupane is offline Novice
    Windows XP Access 2003
    Join Date
    Mar 2010
    Posts
    7
    Style Blank Component
    SK-R032O-00000 Unknown ZWI-7461AS
    SK-R032O-00000 ZSK-7038B ZSK-7038B
    SK-R397V-00000 ZBL-3978CO ZBL-3978CO
    SK-R402V-00000 Unknown ZWI
    SK-R402V-00000 ZSK-7177CO ZSK-7177CO
    SK-R411V-00000 ZSK-7003CO ZSK-7003CO
    SK-R415V-00000 ZSK-7341CO ZSK-7341CO

  4. #4
    sneupane is offline Novice
    Windows XP Access 2003
    Join Date
    Mar 2010
    Posts
    7
    The above post was my query result. Now using that query I created a new query. The criteria was on the blank column. blank = "Unknown". Then it gave me data type mismatch error.

  5. #5
    NTC is offline VIP
    Windows Vista Access 2007
    Join Date
    Nov 2009
    Posts
    2,392
    like "Unkown"

    not = "Unkown"

    = is for numbers

  6. #6
    sneupane is offline Novice
    Windows XP Access 2003
    Join Date
    Mar 2010
    Posts
    7
    Sorry I did, like "Unknown" but it did not work gave me the same error.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. mismatch type compare help needed
    By techexpressinc in forum Queries
    Replies: 3
    Last Post: 02-23-2010, 03:27 PM
  2. Replies: 4
    Last Post: 10-26-2009, 05:27 AM
  3. Type Mismatch - HELP!
    By jgelpi in forum Programming
    Replies: 3
    Last Post: 07-17-2009, 03:53 PM
  4. Replies: 2
    Last Post: 03-23-2009, 05:39 AM
  5. "Type Mismatch" Error
    By elmousa68 in forum Access
    Replies: 2
    Last Post: 12-05-2006, 08:28 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums