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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Output variable number of reports based on a table?

Status
Not open for further replies.

Hatchetman240

Technical User
Aug 21, 2003
20
0
0
US
I have a "PhoneBill" table which contains all calls made by all customers. The amount of customers can vary each month. I can relate the PhoneBill table to my Customer table and show exactly how many customers are in the system right now (35). I'd like to be able to have a report that reads that table and outputs an identical report for each customer in the table to a seperate excel file (or a print to pdf version of an access report) in a specific folder with the customername field as the file name. Any ideas?
 
You might try creating a recordset of the active customers, then looping through that recordset and calling the report for each customer. If you output to an rtf text file (readable by Word) you will need to set up a public variable which will contain the customer ID, create a function that just returns the value of the public variable (since you can't refer directly to the variable in building a query), modify the data source query for the report to include the criteria that the customer ID = the value of the function.

The reason for setting up the public variable and function as well as changing the data source of the report is that the function to output to a text file does not permit any filter clause.

Bob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top