Unanswered: A lot of Access requents, but the more importat: How works "acdataerrcontinue"
Hi, I find problem to trap error messages with form_error event.
I'm trying to manage multiple errors generated from different forms with a module only. It is called from each form_error event when errors occurred, suppress built in Access standard error and blocks exit of the current form (I set a variable that I test into form_unload event).
It seems working well. For example, if I don't fill a required table field,
it intercept 3314 error and show appropriate message (also put on the
message the field name and stop fire on this).
Also, it seems working well when I try to change record without fill
all field correctly (I have used "For each ..." to search into form all
wrong fields so that I can stop fire on them only).
But when I try to close the active form (with "X" button) and an error occurs, module shows correct message, asks if I want close the form and if answer is NO, seems call automatic undo.
Why ??? I dont' want that Access reset all. I want maintain all last update.
I see that in this case, Access call form_event twice: First for wrong
field; Second for exit confirm (dataerr=2169).
When the second round is finished and before the fire go on form_unload, undo is called.
Now, if I do not intercept the second error code and I set Response=AcdataErrDisplay, Access show buil in message that ask me
if I want continue. If the answer is NO, it does not close form and does
not change anythings.
Why I'm not able to simulate the same way ? What is my error ?
When I set Response=AcdataErrContinue what does happen at the end
of form_error event ?
Could you help me.
Also, I have tried to understand how Access shows buil in message;
how it know tablename.fieldname when standard message appears
and if possible to get TableName related at one field when form_error
raise because you try to delete its record or change its value, but without