Query Executes OK On Front-End, but Getting "Ambiguous Outer Joins" Trying to View SQL? RRS feed

  • Question

  • Hi

    This query executes without any error on the front-end of Access. 

    But it gives "Ambiguous Outer Joins" error when i try to view SQL (on front-end or in VBA). 

    How to fix? I do not want to create two separate queries if at all possible. 


    Monday, December 28, 2015 2:43 AM


All replies

  • Do I understand this correctly, that you get the message when you want to switch to SQL view? Are you able to save the query? If yes, can you print out the SQL with code like this:

    Dim qdf As QueryDef
    Set qdf = CurrentDB.QueryDefs("YourQuery")
    Debug.Print qdf.SQL

    To me this looks like a corruption, and I recommend to delete and recreate the query from scratch.

    Matthias Kläy, Kläy Computing AG

    Monday, December 28, 2015 11:29 AM
  • I share MK's question.

    I will add however the suggestion to change this query from an aggregate query to a simple select query; save it and give it a name......  I also would make visible the current non displaying fields - - - do all this in order to trouble shoot your query result logic. 

    Then make a new Aggregate query, as you need here, using the saved query as its record source.  This will go along way into giving you insight on its behavior and results.

    Monday, December 28, 2015 10:25 PM
  • Hi johny,

    I agree with msdnPublicldentity. You could split your query into many simple query to work around this issue.

    For more information about how to deal with ambiguous joins. You could refer the link below:
    # Queries VIII: Dealing with ambiguous joins

    Best Regards,


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, December 29, 2015 1:45 AM