Report creating extra pages based on number of sub report entries

NLW-John

New member
Local time
Today, 20:40
Joined
Oct 31, 2018
Messages
2
Hello everyone.

I'm working on a simple purchase order database for my place of work. I have a report containing subreport that forms a purchase order.

The main report includes the delivery address, supplier information, order number etc. And the sub report contains the order details, item description, cost etc. They are connected via the order number and everything works correctly.

I have a macro that displays a single report (rather than all of them) so you can print that order, email it etc.

OPEN REPORT
Report Name: Purchase Order
View: Print Preview
Filter Name:
Where Condition:[PurchaseOrderTbl]![Order Number]=[Forms]![Purchase Order Reference]![Order Number]
Window Mode: Normal

The problem is, when I execute this macro it creates page for every entry on the sub-report (order details). So if I make an order which has 25 items, it creates 25 copies of the same report, all with the same information.

Is there a way I can get round this?

Be gentle, I'm new to all this.

Kind regards,


JB
 
Welcome John
Your post was moderated for some reason so didn't appear at first.
I've approved it and hopefully you will get an answer soon.
However not many here use macros so you may have to wait a while
 
Hi JB,

I don't see anything in your macro that would cause the extra pages. If you open the report manually from the Navigation Pane, do you still see those extra pages? If so, I would think the problem might be with the report and not the macro.

Just my 2 cents...
 
.. So if I make an order which has 25 items, it creates 25 copies of the same report, all with the same information.
..
That happen when the main reports Record Source contains more as 1 record, in the above case 25 records.
So what is the record source for the main report?
 
It has to do with the Main Report's Recordsource.
remove the Link of the Main Report's Recordsource from Order Detail.
 

Users who are viewing this thread

Back
Top Bottom