Create Separte file or report for each Break

Byron

New Member
Joined
Oct 23, 2002
Messages
28
I have a report that has a page break on every new Name code.

Is it possible to create a macro that would actually create a new report for each Name Code.

Currently the report generates a new report page on each name code. How can I create a separate file or report for each Name Code?
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
Because I need to send a separate file for each person's review to a client electronically.
 
Upvote 0
Because I need to send a separate file for each person's review to a client electronically.
 
Upvote 0
What I would do is to call the report from VBA for each code. To do this, I would create a query that groups by your code. Then I would open that query in a recordset, and open your report with a filter for each group while looping through the recordset - saving or emailing it as you go.

Check the arguments for DoCmd.OpenReport to see how to open a report for only one code (WhereCondition).

Let us know if you need further help, and what you want to do with each report once you've opened it (do you want to save it, do you want to email it as you go...).

HTH,

Russell
 
Upvote 0
OK, I need to do the exact same thing. I have a report listing various companies. Each company on the report has a separate page. I need to save each page as a separate report to e-mail to the company.

I am not a programmer, so I don't understand the instructions above. Can you dumb it down a bit for a regular user? I am totally lost.

- Susan
 
Upvote 0

Forum statistics

Threads
1,221,556
Messages
6,160,476
Members
451,649
Latest member
fahad_ibnfurjan

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top