Parameter Query

G

Guest

I have 13 queries I have designed. I then made a report for each query. I
then combined these reports onto one main report making each one a subreport.
I now want to set a parameter query to select cetain data from each of those
subreports. HOW CAN I DO THIS??? If all data was contained in one query it
would be simple but they are all separate? PLEASE if any one can help it
would be graetly appreciated!
 
J

John Spencer

The best way to do this is to use a form's control to get the value and then
reference the control's value in all the underlying queries instead of a
parameter.

Something like:
Parameters [Forms]![SomeFormName]![ControlName] DateTime;
SELECT ...
FROM ...
WHERE SomeDate Field = [Forms]![SomeFormName]![ControlName]

The form must be open for the control's value to be available. You could
add a button to the form to run the report.

Check out this article for a detailed discussion.
http://www.fontstuff.com/access/acctut08.htm

'====================================================
A brief quote from an John Vinson (Access MVP) posting.

You'll need to create a small unbound Form (let's call it frmCriteria) with
a Combo Box control (cboCrit) on it. Use the combo box wizard to select the
table for the selections, and be
sure that the bound field of the combo is the value you want to use as a
criterion. Save this form.

Now use

=[Forms]![frmCriteria]![cboCrit]

as the criterion in your Query.

It's convenient to base a second Form or Report on the resulting query to
display the results; if you put a button on frmCriteria to launch that form
or report, the user can enter the criterion and view the results in one
simple operation!

Quoting John Vinson
 

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