Parameter prompt in non-parameterized Query ??

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Using Access 2003 SP2

I am being wrongfully prompted for a value in a Select statement.

Heres what i'm doing:
A Select Query with an INNER JOIN and a subquery, prompts for the value of
one of the Select fields. I click OK and it resumes.

It prompts for the second item: Process.CompanyName, which also appears in
the ORDER BY clause.
I cant understand why I get the prompt? Does it have something to do with
ORDER BY?

Here is my query:

SELECT
PROCESS.CustomerID, PROCESS.CompanyName, ALLUSERSREPORT.USERFIRSTNAME,
ALLUSERSREPORT.USERLASTNAME, ALLUSERSREPORT.INCLUDEONREPORT,
ALLUSERSREPORT.NEVERINCLUDE
FROM
PROCESS INNER JOIN ALLUSERSREPORT
ON PROCESS.CustomerID = ALLUSERSREPORT.ENTKEY
WHERE (((PROCESS.CustomerID) Not In (SELECT ENTKEY FROM ALLUSERSREPORT WHERE
INCLUDEONREPORT = TRUE)))
ORDER BY PROCESS.CompanyName;
 
You get prompted to enter a value when the field name you are trying to
use does not exist in the table or query you are querying from. Make
sure that CompanyName is the exact name of the field you are trying to
use and not CompName or CompanyNm.
 
That would be correct except for the fact that I can click 'OK' without
specifying a value for the rogue Parameter prompt, and the query returns the
expected results.

In other words, the table most certainly has CompanyName as specified within
the Select.

So, again, I have no idea why I am being prompted for something the query
does not need.

Any other suggestions?
 
Is either Process or ALLUSERSREPORT a query that you are joining to?
If so, look at the query individually to see if there is a CompanyName
parameter in it or run the query by itself to see if that paramter pops
up. Maybe you can backtrack a bit to see where that is coming from.
 
Process is a table.
AllUsersReport is a table.
I just told users to ignore it by clicking OK.
Once they click OK, they get the expected query.
Looking on the net, it seems to be an issue with how access handles ORDER BY
when it has subquery.
 
Back
Top