The following code on a Report works fine when I use a Cmd button on a form to Preview the report.
Private Sub Report_Activate()
'If there is no "Attention" entered, then set related labels to non visible
If IsNull(Me.Att_) Then
Me.Label83.Visible = False
End If
End Sub
I then close the previewed report to return to the form view. I then press another Cmd button to print the report. The code below is for the Cmdprint cmd, and it is exactly the same as the code above used to preview.
Private Sub Report_Open(Cancel As Integer)
'If there is no "Attention" set related labels to non visible
If IsNull(Me.Att_) Then
Me.Label83.Visible = False
End If
End Sub
However, when the report prints, the label is still visible. I have observed that if I print the report using the print button displayed by Access during print preview, the report prints properly, without the label. However, if I use the form’s cmd button to print the report, the label displays.
Suggestions??
Private Sub Report_Activate()
'If there is no "Attention" entered, then set related labels to non visible
If IsNull(Me.Att_) Then
Me.Label83.Visible = False
End If
End Sub
I then close the previewed report to return to the form view. I then press another Cmd button to print the report. The code below is for the Cmdprint cmd, and it is exactly the same as the code above used to preview.
Private Sub Report_Open(Cancel As Integer)
'If there is no "Attention" set related labels to non visible
If IsNull(Me.Att_) Then
Me.Label83.Visible = False
End If
End Sub
However, when the report prints, the label is still visible. I have observed that if I print the report using the print button displayed by Access during print preview, the report prints properly, without the label. However, if I use the form’s cmd button to print the report, the label displays.
Suggestions??