hiiii dears
how to insert (add ) a code to all code events in my db.
i want to add error handling code to all events that is contain code in my db.
this code as allenbrowne explain in
http://allenbrowne.com/ser-23a.html
i want every time insert this code to change (Somename) to the event name, like :
in the form_current event change to :
how to insert (add ) a code to all code events in my db.
i want to add error handling code to all events that is contain code in my db.
this code as allenbrowne explain in
http://allenbrowne.com/ser-23a.html
i want every time insert this code to change (Somename) to the event name, like :
Code:
Private Sub grpcmbo_AfterUpdate()
On Error GoTo Err_grpcmbo_AfterUpdate ' Initialize error handling.
"Mycode
' Code to do something here.
Exit_grpcmbo_AfterUpdate: ' Label to resume after error.
Exit Sub ' Exit before error handler.
Err_grpcmbo_AfterUpdate: ' Label to jump to on error.
Select Case Err.Number
Case 9999 ' Whatever number you anticipate.
Resume Next ' Use this to just ignore the line.
Case 999
Resume Exit_grpcmbo_AfterUpdate ' Use this to give up on the proc.
Case Else ' Any unexpected error.
Call LogError(Err.Number, Err.Description, "grpcmbo_AfterUpdate")
Resume Exit_grpcmbo_AfterUpdate
End Select
End Sub
in the form_current event change to :
Code:
Private Sub Form_Current()
On Error GoTo Err_Form_Current ' Initialize error handling.
"Mycode
' Code to do something here.
Exit_Form_Current: ' Label to resume after error.
Exit Sub ' Exit before error handler.
Err_Form_Current: ' Label to jump to on error.
Select Case Err.Number
Case 9999 ' Whatever number you anticipate.
Resume Next ' Use this to just ignore the line.
Case 999
Resume Exit_Form_Current ' Use this to give up on the proc.
Case Else ' Any unexpected error.
Call LogError(Err.Number, Err.Description, "Form_Current")
Resume Exit_Form_Current
End Select
End Sub