I have a form, which I open in dialog mode, and through the openArgs I set some values in the form (in a new record) thus dirtying the form.
The idea is then that the user should make a selection in a combobox and then just close the form again.
However, if you close the form without making a selection in the combobox, I do NOT want to save the record since its only half-finished. So I have simple code in the forms BeforeUpdate, to check if combobox is null, and if so, set Cancel=True (cancelling the update)
However, the user then gets a msgbox saying the record could not be saved, possible due to an error in the database. Now a msg like that is gonna freak out the standard user.
How do I prevent this error message from happening?
Other info:
Access 2003
Form is opened in dialog, in Add-Only mode.
The idea is then that the user should make a selection in a combobox and then just close the form again.
However, if you close the form without making a selection in the combobox, I do NOT want to save the record since its only half-finished. So I have simple code in the forms BeforeUpdate, to check if combobox is null, and if so, set Cancel=True (cancelling the update)
However, the user then gets a msgbox saying the record could not be saved, possible due to an error in the database. Now a msg like that is gonna freak out the standard user.
How do I prevent this error message from happening?
Other info:
Access 2003
Form is opened in dialog, in Add-Only mode.
Comment