Results 1 to 2 of 2
  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
    hapm is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2014
    Posts
    197
    OrdDet is from the first table? Is it an outer join query? Please provide the full query. Here is a first guess for the case when you answer the to questions with yes: OrdDetails: IIf(IsNull([OrdDet];Null;Left([OrdDet],InStr([OrdDet]," ")-1)))

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

Similar Threads

  1. Replies: 2
    Last Post: 11-21-2013, 10:40 AM
  2. Replies: 1
    Last Post: 07-31-2012, 02:03 PM
  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