Hello,
I open a ADODB recordset using the following SQL (using the connection string CurrentProject.Connection), and the recordset is NULL.
If a paste the SQL into an Access query and run - it returns 4 records.
I don't understand - is anybody able to shed light on this please?
Thanks in advance,
Tim
SELECT tblAcquisitions.AcquisitionNumber AS [Number], tblAcquisitions.Title, tblAcquisitions.ReceivedDate AS [Received Date], tblCompany.CompanyName AS [Company Name], tblStatus.Status, tblTape_Location.Name AS [Tape Location]
FROM tblStatus
RIGHT JOIN (((tblAcquisitions INNER JOIN tblCompany ON tblAcquisitions.CompanyID = tblCompany.CompanyID)
LEFT JOIN (SELECT Max(tblTape_Location.Tracking_ID) AS MaxOfTracking_ID, tblTape_Location.Tape_Number
FROM tblTape_Location
GROUP BY tblTape_Location.Tape_Number) Max_Tracking_ID
ON tblAcquisitions.Tape_Number = Max_Tracking_ID.Tape_Number) LEFT JOIN tblTape_Location ON Max_Tracking_ID.MaxOfTracking_ID = tblTape_Location.Tracking_ID) ON tblStatus.StatusID = tblAcquisitions.StatusID
WHERE tblTape_location.Name Like '*sarah*'
I open a ADODB recordset using the following SQL (using the connection string CurrentProject.Connection), and the recordset is NULL.
If a paste the SQL into an Access query and run - it returns 4 records.
I don't understand - is anybody able to shed light on this please?
Thanks in advance,
Tim
SELECT tblAcquisitions.AcquisitionNumber AS [Number], tblAcquisitions.Title, tblAcquisitions.ReceivedDate AS [Received Date], tblCompany.CompanyName AS [Company Name], tblStatus.Status, tblTape_Location.Name AS [Tape Location]
FROM tblStatus
RIGHT JOIN (((tblAcquisitions INNER JOIN tblCompany ON tblAcquisitions.CompanyID = tblCompany.CompanyID)
LEFT JOIN (SELECT Max(tblTape_Location.Tracking_ID) AS MaxOfTracking_ID, tblTape_Location.Tape_Number
FROM tblTape_Location
GROUP BY tblTape_Location.Tape_Number) Max_Tracking_ID
ON tblAcquisitions.Tape_Number = Max_Tracking_ID.Tape_Number) LEFT JOIN tblTape_Location ON Max_Tracking_ID.MaxOfTracking_ID = tblTape_Location.Tracking_ID) ON tblStatus.StatusID = tblAcquisitions.StatusID
WHERE tblTape_location.Name Like '*sarah*'