Use recordset as input to Query

J

johnnywinter

I have a macro"XX" that runs a query"ONEREP" & prints a report"SALES ONE
REP" as a snapshot.
User has to input a value for a field[REP] so that only those
records for that one [REP] will be included in the Report.

I want to eliminate the need for the manual input of the [REP] values.


Query is "ONE REP" that uses 2 tables: REPMASTER and COLLECTIONS
tables are linked by the fields tableREPMASTER!REP and table"COLLECTIONS !
AREP",
query selects all fields from both tables and all records from table
COLLECTIONS

Table REPMASTER contains 1 record for each sales rep (only 30- 40 records)

QUESTION:
1) How can I loop the records in table REPMASTER and include each record's
value in field [REP] in the Query-- and print the report as a snapshot (with
report saved as "SALES ONE REP" + [REP]- so we will know which report is
for which Rep.

I have read a bit about looping a recordset , but I am unclear if that is the
best way to handle this.

Sample Code or a link I can read, or even a book refeerence will be
appreciated.
 

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