L
LMB
Hi,
Using Access 2000 and I guess it's time to really try to understand VB. I
do have the book Beginning VB for Access 2000 but the thickness of the book
intimidates me and forces me to just leave it on the shelf. Well, I think I
have learned all I can by trial and error and clicking around to see what
happens and I don't know the vb terms well enough to search for excatly what
my problem is. I will be picking it up pretty soon but before I do, I was
wondering what the error message below is telling me? This code was created
by the program when I used the wizard to make a command button on a form to
open a report. The button works but after someone told me that I should
debug compile and save anytime I insert code (maybe they meant when I made
it myself instead of using a wizard?) I decided to look at the properties
of all my buttons and do this. When I clicked on debug/compile, I got this
message.........Thanks Linda
Compile error: Label not defined.
The curser jumps to the following line...
On Error GoTo Err_btnDepartmentSeniority_Click
This is the whole subroutine...Is this a subroutine or a module or what?
___________________________________________________________
Private Sub btnDepartmentSeniority_Click()
On Error GoTo Err_btnDepartmentSeniority_Click
Dim stDocName As String
stDocName = "rptDepartmentSeniority"
DoCmd.OpenReport stDocName, acPreview
Exit_btnDepartmentVTO_Click:
Exit Sub
Err_btnDepartmentVTO_Click:
MsgBox Err.Description
Resume Exit_btnDepartmentVTO_Click
End Sub
_____________________________________________________________
Using Access 2000 and I guess it's time to really try to understand VB. I
do have the book Beginning VB for Access 2000 but the thickness of the book
intimidates me and forces me to just leave it on the shelf. Well, I think I
have learned all I can by trial and error and clicking around to see what
happens and I don't know the vb terms well enough to search for excatly what
my problem is. I will be picking it up pretty soon but before I do, I was
wondering what the error message below is telling me? This code was created
by the program when I used the wizard to make a command button on a form to
open a report. The button works but after someone told me that I should
debug compile and save anytime I insert code (maybe they meant when I made
it myself instead of using a wizard?) I decided to look at the properties
of all my buttons and do this. When I clicked on debug/compile, I got this
message.........Thanks Linda
Compile error: Label not defined.
The curser jumps to the following line...
On Error GoTo Err_btnDepartmentSeniority_Click
This is the whole subroutine...Is this a subroutine or a module or what?
___________________________________________________________
Private Sub btnDepartmentSeniority_Click()
On Error GoTo Err_btnDepartmentSeniority_Click
Dim stDocName As String
stDocName = "rptDepartmentSeniority"
DoCmd.OpenReport stDocName, acPreview
Exit_btnDepartmentVTO_Click:
Exit Sub
Err_btnDepartmentVTO_Click:
MsgBox Err.Description
Resume Exit_btnDepartmentVTO_Click
End Sub
_____________________________________________________________