Batch Printing a report for multiple records
Posted on 2009-12-16
So I have a database used to store orders. For each order it generates a picking list and a delivery report. If I am on the order record in the form then clicking my print button will run both macros and print the reports with their addresses, and corresponding totals, and then set the printed field to today's date.
However if I import the orders in a batch, then I would have to view each order in the form and print separately. I want to make a piece of code, or macro that will print the picking list report and delivery report, and run a stock update query and update the printed field, for every order record in which the printed field is null.
I tried setting the criteria for the report to Is Null (printed) but it just combined all of the order details for the separate orders onto one report, only giving it one address and total. I'm fairly sure this is to do with how the detail in the report is set up, but I can't put the address in there otherwise it would be repeated for every part they have ordered.
Maybe there is something in coding to do with an array or something? I'd be grateful for any assistance.