Q:

Access Error: The ORDER BY expression includes fields that are not selected by the query

I keep getting the same error: But as far as I can tell it is included in the Query:
SELECT TOP 1 tblOutlets.OutletName, tblOutlets.Parish, Count([Query OOSActions].OODate) AS CountOfOODate1
FROM tblOutlets INNER JOIN [Query OOSActions] ON tblOutlets.OutletID = [Query OOSActions].OutletLookup
WHERE ((([Query OOSActions].OODate) Between [Forms]![Settings]![StartDate] And [Forms]![Settings]![EndDate]) AND (([Query OOSActions].Classification)="Biscuit"))
GROUP BY tblOutlets.OutletName, tblOutlets.Parish
HAVING (((tblOutlets.Parish)="St. Mary"))
ORDER BY Count([Query OOSActions].OODate) DESC;

UNION

SELECT TOP 1 tblOutlets.OutletName, tblOutlets.Parish, Count([Query OOSActions].OODate) AS CountOfOODate1
FROM tblOutlets INNER JOIN [Query OOSActions] ON tblOutlets.OutletID = [Query OOSActions].OutletLookup
WHERE ((([Query OOSActions].OODate) Between [Forms]![Settings]![StartDate] And [Forms]![Settings]![EndDate]) AND (([Query OOSActions].Classification)="Biscuit"))
GROUP BY tblOutlets.OutletName, tblOutlets.Parish
HAVING (((tblOutlets.Parish)="St. Catherine"))
ORDER BY Count([Query OOSActions].OODate) DESC;

A:

I solved it by including ORDER BY only in the first query and then removing all ending semicolons. Thanks for that bit @Uueerdo

