QUERY STILL BOMBING!!!

  • Thread starter Thread starter Aaron Ackerman
  • Start date Start date
A

Aaron Ackerman

Works in SQL Server not in Access, why??

SELECT
tbl_SQuotes.SQuoteID, tbl_OpOptions.[Option],
tbl_OpOptions.Standard,
tbl_OpOptions.OTypeID,
tbl_Series.Series,
tbl_Models.ModelNo,
tbl_SDealers.Dealer,
tbl_SClients.Company,
tbl_SClients.FirstName,
tbl_SClients.LastName,
tbl_SQOptions.OptionCost,
tbl_SQOptions.OpCount,
tbl_OpOptions.OpSubTypeID,
tbl_SQOptions.IsRoomOp,
tbl_SQOpNotes.PrintYN,
tbl_SQOpNotes.SQOpNote,
tbl_SQRoomDetail.RoomName
FROM
tbl_SQOptions INNER JOIN
tbl_OpOptions ON tbl_SQOptions.OptionID = tbl_OpOptions.OptionID INNER JOIN
tbl_SQuotes INNER JOIN
tbl_SClients ON tbl_SQuotes.ClientID = tbl_SClients.ClientID INNER JOIN
tbl_Models ON tbl_SQuotes.ModelID = tbl_Models.ModelID INNER JOIN
tbl_Series ON tbl_SQuotes.SeriesID = tbl_Series.SeriesID INNER JOIN
tbl_SDealers ON tbl_SQuotes.DealerID = tbl_SDealers.DealerID INNER JOIN
tbl_SQRoomDetail ON tbl_SQuotes.SQuoteID = tbl_SQRoomDetail.SQuoteID ON
tbl_SQOptions.SQuoteID = tbl_SQuotes.SQuoteID LEFT JOIN
tbl_SQOpNotes ON tbl_SQOptions.SQOpsID = tbl_SQOpNotes.SQOpsID
 
Because Access REQUIRES that you use parentheses in the FROM clause to specify
the order of the joins. I'm not sure but your from clause might need to look like:

....
((((((tbl_SQOptions INNER JOIN
tbl_OpOptions ON tbl_SQOptions.OptionID = tbl_OpOptions.OptionID) INNER JOIN
tbl_SQuotes INNER JOIN
tbl_SClients ON tbl_SQuotes.ClientID = tbl_SClients.ClientID) INNER JOIN
tbl_Models ON tbl_SQuotes.ModelID = tbl_Models.ModelID) INNER JOIN
tbl_Series ON tbl_SQuotes.SeriesID = tbl_Series.SeriesID) INNER JOIN
tbl_SDealers ON tbl_SQuotes.DealerID = tbl_SDealers.DealerID) INNER JOIN
tbl_SQRoomDetail ON tbl_SQuotes.SQuoteID = tbl_SQRoomDetail.SQuoteID ON
tbl_SQOptions.SQuoteID = tbl_SQuotes.SQuoteID) LEFT JOIN
tbl_SQOpNotes ON tbl_SQOptions.SQOpsID = tbl_SQOpNotes.SQOpsID
 
Back
Top