Hi everyone,
The following query is no longer working:
Code:
SELECT qry_RegPercent.UID, qry_RegPercent.Region, qry_RegPercent.Percent INTO tbl_DominantRegion_Oct12
FROM qry_RegPercent, [SELECT max(Percent) as MaxPct, UID FROM qry_RegPercent GROUP BY UID] AS maxresults
WHERE (((qry_RegPercent.UID)=maxresults.UID) And ((qry_RegPercent.Percent)=maxresults.MaxPct))
ORDER BY qry_RegPercent.UID;
It was working before because I have a tbl_DominantRegion_date in my database created from running the query earlier. The query it references (qry_RegPercent) still works. The error I am getting is: The Microsoft Jet database engine cannot find the input table or query 'SELECT max(Percent) as MaxPct, UID FROM qry_RegPercent GROUP BY UID'. Make sure it exists and that its name is spelled correctly.
Running the query in an older, backed up, version of the database, and pasting the SQL into a new query produce the same error.
I don't see anything wrong with the SQL (although I definitely had help writing it), do you?
Thank-you!