Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Can I create a criteria 'loop' for more than one query?

Status
Not open for further replies.

tracywca

Technical User
Oct 5, 2001
1
CA
I have a report that requires information from many different date fields. All the fields have been counted and summed in individual queries. I have created subreports with these totals then placed them into the main report. All these fields use the same date range at any one time (monthly totals, yearly totals).
Is it possible to have a user type in a date range once that I can point all the querys towards? How do I make the criteria return AND instead of OR across different fields?
Possible?
Thanks
 
Tracy,

You could use a popup form with two textboxes (or 2 combo boxes or 2 calendar controls) and reference those values for your queries. eg: The user would specify From Date in combo1 and To Date in combo2.

Set the appropriate Date criteria in all queries to:

Code:
>= [yourForm]![Combo1] AND <= [yourForm]![Combo2]

Be sure you don't close the pop up form while people can run the queries or they'll be asked for the info.

HTH


John
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top