The following was posted before, but the response posts are not helping me.
I have the exact same problem and is re-asking the question?
....
I have validation in the Before_Update event. Works great except for the unload of a form.
Scenario -
1) user changes data in a field
2) clicks the X on the form to close the form, triggering the unload event
3) prior to the unload event, the before_update event occurs
4) in this scenario, the user entered invalid data, the before_update event is cancelled (cancel = true) due to the validation
5) for some reason, the form_error event occurs - displaying a message box "You can't save this record at this time - do you want to close and lose your data?" (error 2169). If you click Yes, the form closes and all information is undone. If you answer No, the form redisplays with the data in it. This is the path I would like to take without having to deal the MS Access's not so
user-friendly at all. I tried to intercept to place my own message by setting the RESPONSE property of the form_error event to acDataErrContinue. The problem is - it takes the path as if you had answered "Yes" to the earlier question.
I would really like the data to stay on the screen giving the user the chance to correct the problem before exiting the screen.
I have the exact same problem and is re-asking the question?
....
I have validation in the Before_Update event. Works great except for the unload of a form.
Scenario -
1) user changes data in a field
2) clicks the X on the form to close the form, triggering the unload event
3) prior to the unload event, the before_update event occurs
4) in this scenario, the user entered invalid data, the before_update event is cancelled (cancel = true) due to the validation
5) for some reason, the form_error event occurs - displaying a message box "You can't save this record at this time - do you want to close and lose your data?" (error 2169). If you click Yes, the form closes and all information is undone. If you answer No, the form redisplays with the data in it. This is the path I would like to take without having to deal the MS Access's not so
user-friendly at all. I tried to intercept to place my own message by setting the RESPONSE property of the form_error event to acDataErrContinue. The problem is - it takes the path as if you had answered "Yes" to the earlier question.
I would really like the data to stay on the screen giving the user the chance to correct the problem before exiting the screen.