Results 1 to 7 of 7
  1. #1
    gasmaskman is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2014
    Posts
    23

    Microsoft Access can’t represent the join expression

    I have the following query and when I attempt to view it in Design Mode I get the error: "Microsoft Access can’t represent the join expression". I kow that parentheses can cause this issue, but I don't see any extra parentheses included in this query. Any help is greatly appreciated.



    Code:
    SELECT * FROM [Summary File] INNER JOIN [Number Reference] 
    ON ([Summary File].[SALE NAME] = [Number Reference].[Number ID]) OR ([Summary File].[SALE NAME] = [Number Reference].[Alternate ID])
    WHERE ([Number Reference].[Service Number]=[forms]![Maverick Data].[svcnumber1]);

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,848
    Have you checked the format and syntax of an Inner Join?
    Here's a link

    Welcome to the forum and good luck with your project.

  3. #3
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    Looks like two different data types
    SALE NAME] = [Number Reference].[Number ID])

  4. #4
    gasmaskman is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2014
    Posts
    23
    ItsMe, the data types for all fields are listed as text.

    orange, I reviewed the format and syntax and could not find anything in the code that stands out as a problem, expect for adding a line break before 'INNER JOIN'.

  5. #5
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    Some statements can not be represented in design view. The OR operator is what is causing the issue for you here.

  6. #6
    gasmaskman is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2014
    Posts
    23
    Hmmm, I was really hoping that the would be some type of work around. Thanks for the help!

  7. #7
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,848
    gasmaskman,


    I'm going to change my response, for the moment. I did see a post where the poster was trying to set up sql whereby a "Property (land/house)" could involve 2 agents. It was not in his original specs where he had allowed for 1 agent to be associated with a Property. As a quick fix he adjusted his Property table to include a second Agent field (Agent2). He tried the query wizard to set up the relationship and could not get it to work.

    His solution, and he said it works and in his case it's quite fast, was to include an OR condition on a left Join. I have not tested it, but I have never seen an OR condition in a JOIN before. So, I remain a little skeptical at the moment - I want to see it work. I do have a lot of respect for the OP and the posters who responded.
    Here is the link.


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

Similar Threads

  1. Replies: 5
    Last Post: 05-04-2019, 09:02 PM
  2. Replies: 2
    Last Post: 09-07-2012, 03:57 PM
  3. Replies: 2
    Last Post: 10-02-2011, 01:27 PM
  4. Replies: 1
    Last Post: 09-13-2011, 01:52 PM
  5. Replies: 1
    Last Post: 09-09-2009, 04:42 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