One set of Parameters for 2 queries

gguy

Registered User.
Local time
Today, 10:40
Joined
Jun 27, 2002
Messages
104
I need to run several begining/ending date parameter queries. All of the queries are on based on separate unrelated tables but for the same date range. I would like to be able to run a procedure to enter the begining and ending date parameters, one time and run all of the queries.

One of the queries is as follows:

SELECT inspections.inspection_type, Count(inspections.inspection_type) AS CountOfinspection_type
FROM inspections
WHERE (((inspections.inspection_date)>=[begining date] And (inspections.inspection_date)<=[ending date]))
GROUP BY inspections.inspection_type;

Thanks in advance for the help, GGuy
 
Create a form and put unbounded text boxes on the form to hold each of your parameter values (or add these parameter fields to an existing form).

You can then reference the values on the form from one or more queries using the following syntax:

[Forms]![frmYourForm]![txtYourAppropriateParameterControl]
 
Or you can create a table just for the parameters. Only include one row of data storing your parameters and reference them like this: [tablename].[fieldname].
 

Users who are viewing this thread

Back
Top Bottom