In MS Access 2007 I occasionally come across this issue: A query will start to produce a "Enter Parameter Value" prompt -- only the prompt is for a field that I do not reference in my SQL.
Example (query name: qryOPI_ReportingLocation):
SELECT CODES.ReportingLocation, DateValue(OPI.EncDateTime) AS ApptDate, OPI.MedRec, OPI.AccessCode
FROM [OPI DATA] AS OPI LEFT JOIN [Access Codes] AS CODES ON OPI.AccessCode=CODES.Code
WHERE (IsNumeric(MedRec)) And (OPI.EncDateTime>=#10/1/2013#) AND (OPI.EncDateTime<#10/1/2014#);
Prompt:

Why am I being asked for this parameter? If I hit Cancel, the query fails to run. If I enter any value (for example: bob) the query will run correctly.
My Solution So Far:
What's really frustrating, is if I take that same SQL, paste it into a newly created query it runs without a hitch. I then delete the old query and rename the new one until next time.
Is there a better way?