Error Trapping

bauer

Registered User.
Local time
Today, 09:37
Joined
Aug 23, 2001
Messages
77
Could someone please help me figure out how to trap errors. I have a form with Navigation buttons, and I would like to trap errors when used by more than one user when the record is about to be updated.

Thank you
 
to clarify, I want to get rid of the "write conflict error box"
 
Two approaches come to mind.

First, you might look at whether the lock style is set to optimistic or pessimistic. This is a form property.

Second, the trap would have to go in the button code. The only reason you get the box is because the default error handler code for buttons is

xbutton_click_error:
msgbox err.description
resume xbutton_click_exit

The box you want to lose is triggered by that msgbox function. To get rid of the box, modify that code to do something else like reset the form to look just like it did before the button was pressed. Or maybe supply a different message.
 
Just to make a note, I have tried that. For some reason I can't get any error catching to catch it. I tried ignoring any error messaged, trying to trap it with the error codes. I'm not sure what I'm doing wrong...

Thank you
 

Users who are viewing this thread

Back
Top Bottom