Queries and Parameters

Z

Zachary Turner

I have a couple of saved queries, and I want the queries to take
parameters. However, one of the queries needs to call an existing
query, and is being referenced twice so it's prompting me for the
parameter twice. How can I fix this? For the record, the outermost
query is:

SELECT DISTINCT Ingredient
FROM Recipes INNER JOIN ZonePossibleSynths ON Recipes.[Synth
ID]=ZonePossibleSynths.[Synth ID];

the ZonePossibleSynths query takes a parameter, and because of this I'm
getting the prompt twice. What would be nice is to specify in this
query that it takes a parameter, and somehow pass the value into the
inner query so that the inner one doesn't prompt, it just receives the
value you give it. Is this possible?

Thanks
 
M

MacDermott

Open each query in Design View.
On the menu, select Query - Parameters.
In the dialog that appears, list each parameter, with its type.

If you have more than one parameter, make sure they're listed in the same
order in each query.

HTH
- Turtle
 
Top