How do I use Records returned from a query to run another query?

B

BABs

I have a query that returns the names of sites for a certain job number and
exports the data to excel. Now I want to take each of the sites and run a
query to list employees and products. Example return from site query for
Job#1:
East Plant
West Plant
South PLant
Now I want access to run the employee query using East Plant first, then
West Plant and finally South Plant.
Then I want it to run the product query for each site.
I can do this with another form and manually pick the site to run the query
for, but I would like to automate everything from the selection of the job
number.
Thanks for any help!
 
D

Dale Fye

BABs,

It sounds like what you really need is a report.

Use the site query to get the sites that are pertinent to your main report.
Then, create subreports for the employees, and products. Link these to
sub-reports to the main report on the SiteID field.

--
HTH
Dale

Don''t forget to rate the post if it was helpful!

email address is invalid
Please reply to newsgroup only.
 
B

BABs

Thx Dale, but I want the stats in a query that I export to excel because I'm
using a Word template that uses the data in different fields (linked to the
workbook sheets). With my limited experience, it's just easier for me to
manipulate the data that way.
 

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