Results 1 to 3 of 3
  1. #1
    msaccessdev is offline Novice
    Windows 8 Access 2013
    Join Date
    Jun 2014
    Posts
    13

    Error in Access query

    Hi There,



    I am trying to join 2 tables based on the Employee ID and pulling out order name details. I have written a query and with in the query i have written a function something like this

    OrdDetails: Left([OrdDet],InStr([OrdDet]," ")-1))

    and it is running fine for the records that are matching in the tables. If there is no record in the first table then this expression throwing an error "#Error".

    please advice.

  2. #2
    lfpm062010 is offline Competent Performer
    Windows 7 64bit Access 2010 64bit
    Join Date
    Oct 2013
    Location
    US
    Posts
    415
    Please see your post in "Query" section.

  3. #3
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,550
    You need the IF to determine if the [OrdDet] is null. You cant left on nulls.

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

Similar Threads

  1. Error in Access query
    By msaccessdev in forum Access
    Replies: 1
    Last Post: 06-17-2014, 03:02 AM
  2. Replies: 2
    Last Post: 11-21-2013, 10:40 AM
  3. Access 2007 syntax error in query
    By ivanver in forum Queries
    Replies: 3
    Last Post: 04-23-2011, 09:41 AM
  4. Replies: 10
    Last Post: 02-02-2011, 05:48 PM
  5. Access query Error
    By sneupane in forum Programming
    Replies: 2
    Last Post: 03-15-2010, 03:12 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