Results 1 to 14 of 14
  1. #1
    nick243 is offline Competent Performer
    Windows 7 64bit Access 2002
    Join Date
    May 2016
    Posts
    185

    Data Type Mismatch expression


    I have narrowed it down to BRI Locations A query that is causing Data type mismatch in criteria. That I believe has to do with the line expression in the BRI A Locations. I provided the 2 tables that are in the relationship. I cannot find where this datatype mismatch is going on. Thank you for any help in salving this.

  2. #2
    nick243 is offline Competent Performer
    Windows 7 64bit Access 2002
    Join Date
    May 2016
    Posts
    185

    File

    TestDatabase.mdb
    I forgot to add the file.

  3. #3
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    "Line" is a reserved word, change it to something else.

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,917
    Look at the last element of the Line: definition in the query.

  5. #5
    nick243 is offline Competent Performer
    Windows 7 64bit Access 2002
    Join Date
    May 2016
    Posts
    185
    Ok, I see the last element does not have outstations around the 6 because it is a text field. Just add the quotations correct?

  6. #6
    nick243 is offline Competent Performer
    Windows 7 64bit Access 2002
    Join Date
    May 2016
    Posts
    185
    Thank you so much it worked.

  7. #7
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,917
    YES. I tried it and the error goes away.

  8. #8
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    Interesting. RuralGuy, I see you are on 2013 as well yet we got different results. Weird.

  9. #9
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,917
    @aytee111 - What results did you get?

  10. #10
    aytee111 is offline Competent At Times
    Windows 10 Access 2013 64bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    All I did was change the name of the field and it worked!

  11. #11
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,917
    Hmm...The last element of the query was comparing a String to a number and should have thrown the error reported. Maybe it is the difference between 64bit and 32bit Access. Interesting.

  12. #12
    nick243 is offline Competent Performer
    Windows 7 64bit Access 2002
    Join Date
    May 2016
    Posts
    185
    I was trying to stay away from changing the name of the field because it would cause a chain reaction for so many queries. This query is part of a much bigger chain. Thank you for the help.

  13. #13
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,917
    attee111 has a valid point and reserved words should be avoided or they may bite you in the butt later.
    Here's a good reference for Reserved Words: http://www.allenbrowne.com/AppIssueBadWord.html#A

  14. #14
    nick243 is offline Competent Performer
    Windows 7 64bit Access 2002
    Join Date
    May 2016
    Posts
    185
    Thank you for the reference sheet. This database was created well before me. I will try to keep this in mind in the future.

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

Similar Threads

  1. data type mismatch in criteria expression
    By azhar2006 in forum Reports
    Replies: 9
    Last Post: 09-08-2016, 02:33 PM
  2. Replies: 5
    Last Post: 02-25-2015, 08:42 AM
  3. Data type mismatch in criteria expression
    By khughes46 in forum Queries
    Replies: 12
    Last Post: 05-01-2014, 07:34 AM
  4. Data type mismatch in criteria expression
    By bobt_1234 in forum Queries
    Replies: 3
    Last Post: 02-13-2012, 03:37 PM
  5. Data Type mismatch in criteria expression
    By elb1999 in forum Queries
    Replies: 2
    Last Post: 01-20-2012, 02:38 PM

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