Could anyone shed some light on the code needed for a command button which returns the results of a filter (applied to a form AND subform) to a report. I seem to be having problems when it comes to including the subform in the code.
Cheers.
Could anyone shed some light on the code needed for a command button which returns the results of a filter (applied to a form AND subform) to a report. I seem to be having problems when it comes to including the subform in the code.
Cheers.
One way is to treat you report as you would with your form. Create a report with the header details in it then add a sub report containing the child details as per your subform.
Alternatively when you create your report introduce a group by section into your report and group by the field that you are using to filter out the data. So for example if you are printing Invoices You would group by invoice number and in the detail section you would have your order details there.
Likewise if you were wanting it by supplier you would group by supplier in the group header then in the detail section you would list all the invoice headers to show all invoices raised by the supplier.
By setting the Group footer to start a new page After each supplier it would effectively create a report for all suppliers seperately.
David