
Originally Posted by
Lockrin
Hello all, I have a report with certain boxes and labels that I need to be visible based on the value of a checkbox. The code that I have works ONLY IF I print preview first. I have a button that directly prints the report and when I click this it bypasses the code and automatically sets it to visible. Here is what I have:
Private Sub Report_Load()
On Error GoTo Err_Report_Load
If Me.Asterisk.Value = -1 Then
Me.MTDescription.Visible = True
Me.MTOp.Visible = True
Me.MTOpDate.Visible = True
Me.MTAcceptBox.Visible = True
Me.MTRejectBox.Visible = True
Me.MTAccept.Visible = True
Me.MTReject.Visible = True
Me.MTBox1.Visible = True
Me.MTBox2.Visible = True
Me.MTBox3.Visible = True
Me.MTAcceptBox.Visible = True
Me.MTRejectBox.Visible = True
Me.MTReference.Visible = True
Else
Me.MTDescription.Visible = False
Me.MTOp.Visible = False
Me.MTOpDate.Visible = False
Me.MTAcceptBox.Visible = False
Me.MTRejectBox.Visible = False
Me.MTAccept.Visible = False
Me.MTReject.Visible = False
Me.MTBox1.Visible = False
Me.MTBox2.Visible = False
Me.MTBox3.Visible = False
Me.MTAcceptBox.Visible = False
Me.MTRejectBox.Visible = False
Me.MTReference.Visible = False
End If
Exit_Report_Load:
Exit Sub
Err_Report_Load:
MsgBox Err.Description
Resume Exit_Report_Load
End Sub
Any help would be greatly appreciated.