Hello:
I am using two queries to get one result set. The issue is, I return no data when I combine them into one query. I have listed both queries, as well as the 3rd query that shows them combined.
**Max Date/Time Query-Finds the most recent updated record based on the time and date (Correct Results Returned)
SELECT [Yard Panel Number].panelNumber, Max([Yard Location].locDate) AS MaxOflocDate, Max([Yard Location].completionTime) AS MaxOfcompletionTime, [Yard Panel Number].jobNumber, [Yard Location].panelID
FROM [Yard Panel Number], [Yard Location]
WHERE ((([Yard Panel Number].panelID)=[Yard Location].[panelID]))
GROUP BY [Yard Panel Number].panelNumber, [Yard Panel Number].jobNumber, [Yard Location].panelID
ORDER BY [Yard Panel Number].panelNumber;
**From To Query--Finds all record locations (Correct Results Returned)
SELECT [Project Information].jobName, [Project Information].jobNumber, [Yard Location].locationFrom, [Yard Location].locationTo, [Yard Location].panelID, [Yard Location].damage
FROM [Project Information], [Yard Location]
WHERE ((([Project Information].[jobNumber])=[Yard Location].[jobNumber]));
**Finally, Query1--Combines above queries, to find the most recent record of locations, based on the most recent date and time. When I run this query I return NO results
SELECT DISTINCT [FromTo Query].jobName, [FromTo Query].jobNumber, [Max Date/Time Query].panelNumber, [Max Date/Time Query].MaxOflocDate, [Max Date/Time Query].MaxOfcompletionTime, [FromTo Query].locationFrom, [FromTo Query].locationTo
FROM [Max Date/Time Query], [FromTo Query]
WHERE ((([FromTo Query].[paneID])=[Max Date/Time Query].[panelID]))
AND ((([FromTo Query].[jobNumber])=[Max Date/Time Query].[jobNumber]));
I can't figure it out, Please advise!
Any assistance is appreciated. :?