Queries based on results received from query with parameter values

  • Thread starter Thread starter Lena
  • Start date Start date
L

Lena

I have created a parameter query that calls all the
records for a specific region. Now that I have the query
results, I would like to base other queries on the results
of this initial parameter value without being asked to key
the region each time I run the second, third, etc. query.
Can someone send me in the right direction with this one?

Thanks folks.
 
If you base the second Query on the first Query, the Parameter value will be
asked for again when you run the second Query since the execution of the
second Query needs to execute the first Query again. Remember that Select
Queries don't actually hold data.

You can convert the first Query to a Make-Table to create a temporary Table
and then base your second Query on the temporary Table. However, this is
probably the least preferred option as it creates temporary Table.

You can use a Form "frmParameter" with a TextBox Control to hold the
Parameter value and a CommandButton to run your Query. Use the reference to
the TextBox as the Parameter. When you run the Query, Access will pick up
the value from the TextBox and does at for the Parameter. Of course, this
means that the frmParameter must be open and there is a value in the TextBox
when you run the Query.
 
The user will have the form open when they are searching
for additional information in the record. Not sure I
understand frmParameter. Can you explain that in a little
more detail, just a little.

:)) Thank you.
 
Back
Top