View Single Post
  #1 (permalink)  
Old 05-31-2008
Steve W Steve W is offline
Peon
 
Join Date: Apr 2008
Posts: 8
Default Visual Basic in MS Access, Debug / Compile issue.?

Ok I have a piece of code for printing out a report which works on all of my reports, however I'm attempting to use similar code to print out a new report and it just will not work....It continually comes up with a error message -

Compile Error - Label not defined.

This is the code I'm using....whats wrong with it?

Private Sub Command49_Click()
On Error GoTo Command49_Click


Dim stDocName As String
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70

stDocName = "ParametricJS"
DoCmd.OpenReport stDocName, acNormal

Exit_Command49_Click:
Exit Sub

Err_Command49_Click:
MsgBox Err.Description
Resume Exit_Command49_Click

End Sub
Reply With Quote
Sponsored Links