Query Query

SiGill

Registered User.
Local time
Today, 08:04
Joined
Dec 22, 2008
Messages
72
I have an access database. It has 2 tables, One with a list of peoples names and one with a list of orders. I have one query. I want to be able to run this query for each person in the first table and export the data as that persons name. THen move onto the next, and so on

Is there a way I can get access to run the query for each reference then stop when it gets to the last person?

hope that makes sense
 
A Query should stop when it has completed it's task.

Do you want to Export or just produce a List result?

Either way the query be it Select - List or Append / Make Table to store the result will do the task and stop when it has finished.

Make the query as Select first to ensure you have the correct result and then change it to Append or Make Table to do the task.
 
Thanks for the reply, I don't think I explained it well.

I have a table with, for example, 5 peoples names in it. I also have another table with orders these people have placed in, lets say, 3 months. What I want to to is run the one query 5 times, i.e. for each person in the table to show that persons orders. Then export the data to access as the persons name.
 
I don't think your latest message explains your requirement clearly.
What do you want to accomplish - don't focus on running the query X times.

eg.
I have a table of People and a table of Orders.
I would like to find All Orders for each Person during the last 3 Months.

What fields are in each of your tables?
How are your tables related?
What have you tried so far?

Just trying to clarify/understand what it is you're trying to do.
Good luck
 
Also, you don't export to access, unless you mean another database.
All you do is simply create a record set. The query does this without any hassle.
This records set is then used how you wish. The records set isn't stored, it is created each time you need and therefore has up to date data.
 

Users who are viewing this thread

Back
Top Bottom