Compile Error

Melody

Registered User.
Local time
Today, 11:37
Joined
Aug 11, 2000
Messages
47
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 on the button I get the error message "Compile Error: Label Not Defined", and it highlights my first line of code. Everything in it looks fine to me and is referencing correct objects. Does anyone know what the problem might be?

Thanks!!!
 
Change
Resume Exit_Preview_Report_Click
to:

Resume Exit_PackingSlipButton_click

Your trying to go to a label not defined in this sub.

Skip
 
SKIP - Thanks! Problem solved!!!!
 

Users who are viewing this thread

Back
Top Bottom