Hi
I have a form that displays lots of data in various list boxes and calculated fields. It is also larger than the width of 1 sheet of A4. Hence if you print it shows some of the totals on page 2 and is generally unpleasant.
I wanted to allow the user to print out a simpler summary view as a record of the work done (a financial reconciliation). As the form has many hundreds of lines of code I didn't want to duplicate it into a report.
To do this I created a subform which sits on top of the main form and on a button press on the main form it is made visible and populated with the summary data (as per the code fragment below):
.........
Form.[LUCY WORLDPAY RECON PRINTOUT]!TotalAdjustedSalesD = Me.TotalAdjustedSalesD
Form.[LUCY WORLDPAY RECON PRINTOUT]!TotalUKTaxD = Me.TotalUKTaxD
Form.[LUCY WORLDPAY RECON PRINTOUT]!TotalAdjustedShipD = Me.TotalAdjustedShipD
Form.[LUCY WORLDPAY RECON PRINTOUT]!WPAfterCommission = Me.NetTotalWorldPayD - Me.TotalMerchantCommissionD
If Me.[LUCY WORLDPAY RECON PRINTOUT].Visible = False Then
Me.[LUCY WORLDPAY RECON PRINTOUT].Visible = True
Else
Me.[LUCY WORLDPAY RECON PRINTOUT].Visible = False
End If
This all works fine and the summary data appears in the sub form correctly on the screen.
The problem I have is when I use :
DoCmd.PrintOut acPages
The Form with the subform on top is printed in the same layout as you see on the screen. However all the subform fields are blank. The fields that you can still see on the main form all have the correct values.
The happens whether the print command is issued from the main form or the sub form.
Please could someone help me to get the fields to appear on the printout?
Many thanks
tony