J
Jörg Werner
I want to hide a field in a report depending on the value of a checkbox. I
use the Report_open event.
Private Sub Report_Open(Cancel As Integer)
Me.txtStorno.Visible =
(Forms!frmMain!frmAuswertungProjekt.Form.optStorno = 1)
End Sub
If I use 'DoCmd.OpenReport strReport, acViewPreview ' everything works
fine.
But if I use 'DoCmd.OutputTo acOutputReport, strReport, acFormatRTF,
strReport & ".rtf", True' to export the report, the field will always be
visible whether the optStorno = 1 or not.
I discovered that the Report_Open event will not fire. And so doesn't the
Report Detail Section's Format event.
So how can I generate a report that looks like the preview?
Thanks
Jörg
use the Report_open event.
Private Sub Report_Open(Cancel As Integer)
Me.txtStorno.Visible =
(Forms!frmMain!frmAuswertungProjekt.Form.optStorno = 1)
End Sub
If I use 'DoCmd.OpenReport strReport, acViewPreview ' everything works
fine.
But if I use 'DoCmd.OutputTo acOutputReport, strReport, acFormatRTF,
strReport & ".rtf", True' to export the report, the field will always be
visible whether the optStorno = 1 or not.
I discovered that the Report_Open event will not fire. And so doesn't the
Report Detail Section's Format event.
So how can I generate a report that looks like the preview?
Thanks
Jörg