Can anyone tell me why i would be getting a compile error on the below code, i really cant work it out.
Option Compare Database
Private Sub GreenFilter_Click()
On Error GoTo err_Handler
DoCmd.OpenForm "FrmMissingData", acNormal, , , acFormEdit, acWindowNormal
DoCmd.Close acForm, "From1", acSavePrompt
err_handler_exit:
End Sub
err_Handler:
If Error = 2427 Then
MsgBox "there is no data"
vbCritical
Cancel = True
Else
MsgBox Err.Description
Resume
exit_NoDataFound
End Sub
Option Compare Database
Private Sub GreenFilter_Click()
On Error GoTo err_Handler
DoCmd.OpenForm "FrmMissingData", acNormal, , , acFormEdit, acWindowNormal
DoCmd.Close acForm, "From1", acSavePrompt
err_handler_exit:
End Sub
err_Handler:
If Error = 2427 Then
MsgBox "there is no data"
vbCritical
Cancel = True
Else
MsgBox Err.Description
Resume
exit_NoDataFound
End Sub