Parameter not Working; Returning all Values

G

Guest

I have never encountered this problem before.

I am trying to use a parameter in a query that utilizes multiple nested
queries (that use parameters also), but when I enter the last parameter, I
get all the records. All the parameters for the nested queries are accepted.


If I "hard code" the parameter in the eventual query (ex. >1000), it works;
I get all the records with the value over 1000. If I create a parameter for
the same field (ex. >[cutoff]), the eventual query asks me to define the
parameter (after all the parameters for the nested queries), and runs, but it
returns all the records, is if this last criteria did not exist. Again the
parameters in the nested queries work.

I would like to eventually create a form to obtain values to use as
parameters in the query, but I think I will continue to have the same
problem.

Is there a conflict between the parameter in the nested queries and the last
parameter? I have tried to format the parameter as a number
(FormatNumber([cutoff]), and that didn't work. The field that I wish to
apply the parameter (criteria) is a number average produced by a nested query.

Thanks in advance.

DEI
 
D

Dirk Goldgar

DEI said:
I have never encountered this problem before.

I am trying to use a parameter in a query that utilizes multiple
nested queries (that use parameters also), but when I enter the last
parameter, I get all the records. All the parameters for the nested
queries are accepted.


If I "hard code" the parameter in the eventual query (ex. >1000), it
works;
I get all the records with the value over 1000. If I create a
parameter for the same field (ex. >[cutoff]), the eventual query asks
me to define the parameter (after all the parameters for the nested
queries), and runs, but it returns all the records, is if this last
criteria did not exist. Again the parameters in the nested queries
work.

I would like to eventually create a form to obtain values to use as
parameters in the query, but I think I will continue to have the same
problem.

Is there a conflict between the parameter in the nested queries and
the last parameter? I have tried to format the parameter as a number
(FormatNumber([cutoff]), and that didn't work. The field that I wish
to apply the parameter (criteria) is a number average produced by a
nested query.

Just possibly the problem may be solved by explicitly specifying the
parameter type in the query that uses it. Open that query in design
view and click menu items Query -> Parameters... to bring up a dialog in
which you can enter the name ("cutoff", I guess) and data type of each
parameter.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top