When the query is saved to ASP, two files are generated: one in ASP format, the other in HTML format. The parameter is written to both, but in the ASP file, the parameter portion that references
Request.QueryString has been incorrectly parsed.
Further, if the query is re-exported to the same name, Access requests to overwrite the ASP file, but does not overwrite the HTML file. This results in a mismatch with
Request.QueryString.
For example, in a query that is based on the Customer table in the sample database Northwind.mdb, the SQL statement might read:
SELECT Customers.CompanyName, Customers.ContactName
FROM Customers
WHERE (((Customers.CustomerID)=[Enter Customer ID]));
When you export the query to ASP format, the syntax becomes:
"SELECT Customers.CompanyName, Customers.ContactName
FROM Customers
WHERE (((Customers.CustomerID)=" & Request.QueryString("[Enter Cu") & "stomer ID])) "