kvb
03-22-2007, 07:36 AM
Hi,
I am running a report/subreport with Access 2000, the subreport has some conditions regarding textbox visibility based on the value of another textbox on the same subreport. This code is placed in the format detail section of the subreport (see below). On the design of the report I have set the visibility to no for the labels and boxes concerned.
MY PROBLEM IS:
When this report previews on the screen, it appears correct. HOWEVER when I send it a printer, it seems to ignore the conditional formatting.
If I send this report direct to a printer, it will print correct.
I have observed the same behaviour in Access 2003.
Does anyone have idea what causes this.
Thanks in advance
Ken
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Dim IN_IO As String
IN_IO = Report_rptInput.txtIO.Value
If IN_IO Like "A*" Then
Report_rptInput.txtCal.Visible = True
Report_rptInput.lblCal.Visible = True
Report_rptInput.txtEU.Visible = True
Report_rptInput.lblEU.Visible = True
End If
If IN_IO Like "FF" Then
Report_rptInput.txtCal.Visible = True
Report_rptInput.lblCal.Visible = True
Report_rptInput.txtEU.Visible = True
Report_rptInput.lblEU.Visible = True
End If
If IN_IO Like "D*" Then
Report_rptInput.txtCal.Visible = False
Report_rptInput.lblCal.Visible = False
Report_rptInput.txtEU.Visible = False
Report_rptInput.lblEU.Visible = False
End If
End Sub
Edited 28-Mar-07 by geekgirlau. Reason: insert vba tags
I am running a report/subreport with Access 2000, the subreport has some conditions regarding textbox visibility based on the value of another textbox on the same subreport. This code is placed in the format detail section of the subreport (see below). On the design of the report I have set the visibility to no for the labels and boxes concerned.
MY PROBLEM IS:
When this report previews on the screen, it appears correct. HOWEVER when I send it a printer, it seems to ignore the conditional formatting.
If I send this report direct to a printer, it will print correct.
I have observed the same behaviour in Access 2003.
Does anyone have idea what causes this.
Thanks in advance
Ken
Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
Dim IN_IO As String
IN_IO = Report_rptInput.txtIO.Value
If IN_IO Like "A*" Then
Report_rptInput.txtCal.Visible = True
Report_rptInput.lblCal.Visible = True
Report_rptInput.txtEU.Visible = True
Report_rptInput.lblEU.Visible = True
End If
If IN_IO Like "FF" Then
Report_rptInput.txtCal.Visible = True
Report_rptInput.lblCal.Visible = True
Report_rptInput.txtEU.Visible = True
Report_rptInput.lblEU.Visible = True
End If
If IN_IO Like "D*" Then
Report_rptInput.txtCal.Visible = False
Report_rptInput.lblCal.Visible = False
Report_rptInput.txtEU.Visible = False
Report_rptInput.lblEU.Visible = False
End If
End Sub
Edited 28-Mar-07 by geekgirlau. Reason: insert vba tags