View Full Version : Need help with nested queries


Cgrnc
08-19-2001, 03:03 PM
My database is used to enter daily work activity. I'm trying to create queries that will be used for a report with subreports.

The main query\report will show work sorted by ActivityName for a given date range (I'm using a parameter query with a beginning date and ending date to get the date range I want.)

The report must also show employees (hour totals), materials totals and equipment used (hour totals) all of which have a many-to-one relationship with the WorkOrder table. I want to use subreports to show these three things for each ActivityName.

My problem: In order to show info in the subreports for the correct date range (chosen by the user) I must either base a query on the main workorder parameter query OR use a parameter query for the subreport . . . BOTH of which make the user enter the date range twice!!

Help please! I have a feeling I'm thinking inside the box on this one! ANY ideas on how to get what I need without duplicate date entry would be appreciated!!!

pcs
08-19-2001, 03:49 PM
not really sure i totally understand your question.

when i have to do this kind of thing, i call a pop-up form from the main form that runs the report. the pop-up gets the date range, and i base the report queries criteria on the info from the pop-up form.

hth,
al

Cgrnc
08-20-2001, 12:53 PM
I thought of using a dialog box to prompt for the beginning and ending dates but wasn't sure I could use the same form for several queries because I thought it would pop-up for each query????

I'll try using a form to run the report. Thank you. I'm still new at this!