Access SQL query for Crosstab query not working

Hi, I'm trying to create a crosstab query in Access 2007 and I'm encountering the following error message after setting up the join property.

The error message is "The SQL statement could not be executed because it contains ambiguous outer joins. To force one of the joins to be performed first, create a separate query that performs that first join and then include that query in your SQL statement."

I'm also enclosing the SQL query for reference:

TRANSFORM Sum(MPlanShipment.NoOfPcs) AS SumOfNoOfPcs
SELECT MPlanShipment.ShipmentCode, tblForwarder.ForwarderName
FROM tblForwarder INNER JOIN (Tbl_Next7days LEFT JOIN MPlanShipment ON Tbl_Next7days.Cur_Date = MPlanShipment.ContTruckingdate) ON tblForwarder.ForwarderID = MPlanShipment.Forwarder
GROUP BY MPlanShipment.ShipmentCode, tblForwarder.ForwarderName
PIVOT Tbl_Next7days.Cur_Date_WkdayName;

Appreciate if you can advise how to amend the SQL query in order run the report.  Thanks you very much.
Who is Participating?
sltan32Author Commented:
Hi Gustav,

Nope, this does not work, it says "Join Expression not supported".
Gustav BrockCIOCommented:
Try using:

    LEFT JOIN (Tbl_Next7days LEFT JOIN

Gustav BrockCIOCommented:
It was mean to replace:

    INNER JOIN (Tbl_Next7days LEFT JOIN

Or just double-click the inner join in the designer and change the join to a left join.

If it still doesn't work (I don't have your tables), move the inner-joined tables to a subquery.

sltan32Author Commented:
problem solved as it is caused by another join in the statement that is not configured properly
sltan32Author Commented:
Found out the reason that causes the SQL not to work as it is caused by another join not properly configured.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.