Hi all
Am I missing something here?
I have a number of procedures where error code like this works fine:
Eg:
Private Sub tglAllowEdit_Cl ick()
On Error GoTo Err_tglAllowEdi t_Click
If Me!tglAllowEdit = True Then
Me!LockCode.Ena bled = True
Else
Me!LockCode.Ena bled = False
End If
Exit_tglAllowEd it_Click:
Exit Sub
Err_tglAllowEdi t_Click:
MsgBox Err.Description
Resume Exit_tglAllowEd it_Click
End Sub
For some others I get "Compile Error Label not defined"
Example code:
Private Sub Form_Current()
On Error GoTo Err_Form_Curren t
Me!LockCode.Ena bled = False
Form_Current_Ex it:
End Sub
Err_Form_Curren t:
MsgBox Err.Description
Resume Form_Current_Ex it
End Sub
I can't see the difference - can anyone tell me what I'm doing wrong?
TIA
Clive
Am I missing something here?
I have a number of procedures where error code like this works fine:
Eg:
Private Sub tglAllowEdit_Cl ick()
On Error GoTo Err_tglAllowEdi t_Click
If Me!tglAllowEdit = True Then
Me!LockCode.Ena bled = True
Else
Me!LockCode.Ena bled = False
End If
Exit_tglAllowEd it_Click:
Exit Sub
Err_tglAllowEdi t_Click:
MsgBox Err.Description
Resume Exit_tglAllowEd it_Click
End Sub
For some others I get "Compile Error Label not defined"
Example code:
Private Sub Form_Current()
On Error GoTo Err_Form_Curren t
Me!LockCode.Ena bled = False
Form_Current_Ex it:
End Sub
Err_Form_Curren t:
MsgBox Err.Description
Resume Form_Current_Ex it
End Sub
I can't see the difference - can anyone tell me what I'm doing wrong?
TIA
Clive
Comment