Dick7Access
Dick S
- Local time
- Today, 10:25
- Joined
- Jun 9, 2009
- Messages
- 4,253
I am studying error handling. I am using VBA Developers Hand Book and some Google stuff. I have been over the material several times and cannot find my mistake. When I click cmdFindState it give me "compile error" " label not defined",and stops at:
Code:
"On Error GoTo Err_cmdFindState_Click"
Code:
Private Sub cmdFindState_Click()
On Error GoTo Err_cmdFindState_Click
DoCmd.OpenForm "frmChurchesAll"
DoCmd.ApplyFilter "qryFindState"
'-----------------------------------------
' 51 Vermont
'------------------------------------------
DoCmd.GoToControl "ComboState"
If ComboState.Text = "VT" Then
Me.lblStLong.Caption = "Vermont"
Me.lblStateOf.Visible = True
Me.lblStLong.Visible = True
End If
Exit_cmdFindState:
Exit Sub
Err_cmdFindState:
MsgBox "this is a test", , "Access"
lbAllChurches.Visible = False
End Sub