I have the following code in a command button:
Private Sub PackingSlipButton_Click()
On Error GoTo Err_PackingSlipButton_Click
Dim stDocName As String
stDocName = "EmployeePackingSlip"
DoCmd.OpenReport stDocName, acPreview
Exit_PackingSlipButton_Click:
Exit Sub
Err_PackingSlipButton_Click:
MsgBox Err.Description
Resume Exit_Preview_Report_Click
End Sub
When I click the button I get the error, "Compile Error: Label Not Defined". Everything appears fine to me, and is referenceing correct objects. Anyone know what might be going on?
Private Sub PackingSlipButton_Click()
On Error GoTo Err_PackingSlipButton_Click
Dim stDocName As String
stDocName = "EmployeePackingSlip"
DoCmd.OpenReport stDocName, acPreview
Exit_PackingSlipButton_Click:
Exit Sub
Err_PackingSlipButton_Click:
MsgBox Err.Description
Resume Exit_Preview_Report_Click
End Sub
When I click the button I get the error, "Compile Error: Label Not Defined". Everything appears fine to me, and is referenceing correct objects. Anyone know what might be going on?