My report header must contain text in a number of text boxes (mAanleiding, mAuditor etc.) filled from fields in an open form linked to a table:
This works fine in print preview, but if I sent the report directly to the printer the text boxes are empty.
If I open the report with acViewPreview, and then with acViewNormal, the printed version does contain the content of the text boxes, but this is not practicable, as my form is modal, and I want to browse in it to another record and then print another report based on the then current record.
Later: I can also get acViewNormal to work by filling the text boxes from the Details_Format event instead of the Report_Load event, but that does not seen very elegant, as that will, I assume, fire for each record in the report.
Code:
Private Sub Report_Load()
Me.Caption = "Toezegging" & Str(Forms!frmLint_Overzichten_Toezeggingen_Bladeren!mNummer_i)
Kop.Caption = "Toezegging" & Str(Forms!frmLint_Overzichten_Toezeggingen_Bladeren!mNummer_i)
mAanleiding = Forms!frmLint_Overzichten_Toezeggingen_Bladeren!mAanleiding
mAuditor = Forms!frmLint_Overzichten_Toezeggingen_Bladeren!mAuditor
mAntwoord = Forms!frmLint_Overzichten_Toezeggingen_Bladeren!mAntwoord
mAfsluiting = priAfsluiting
Voet.Caption = "Afdruk: " & Format(Now, "dd mmmm yyyy hh:mm")
End Sub
This works fine in print preview, but if I sent the report directly to the printer the text boxes are empty.
If I open the report with acViewPreview, and then with acViewNormal, the printed version does contain the content of the text boxes, but this is not practicable, as my form is modal, and I want to browse in it to another record and then print another report based on the then current record.
Later: I can also get acViewNormal to work by filling the text boxes from the Details_Format event instead of the Report_Load event, but that does not seen very elegant, as that will, I assume, fire for each record in the report.