N
Neil
Hello All,
I have a problem with Access 2002. In the BeforeUpdate event of my form, I
have a procedure which loops through all the controls on my form. If any
fields that are required are left blank, I cancel the event and bring up
another form which displays the reason why the event was cancelled and gives
the user an option to undo or return to the main form and continue. This
works great until the user clicks on the close button in the main form. I
then get the Access DataErr 2169
Microsoft Access
You can't save this record at this time.
Microsoft Access may have encountered and error while trying to save a
record.
If you close this object now, the changes you made will be lost.
Do you want to close the object anyway?
Yes No
The form that I open has the functionality of this message box (and gives a
better description of what is wrong and how to correct it) and I would like
to display that instead. I have tried coding the Form_Unload event to do
this but the message box above appears before the Unload event executes. I
have also tried coding the Form_Error event to catch this error and try to
supress the message but can't seem to get that to work either. Does anyone
have any sugestions as to how I can get this to work properly?
TIA,
Neil.
I have a problem with Access 2002. In the BeforeUpdate event of my form, I
have a procedure which loops through all the controls on my form. If any
fields that are required are left blank, I cancel the event and bring up
another form which displays the reason why the event was cancelled and gives
the user an option to undo or return to the main form and continue. This
works great until the user clicks on the close button in the main form. I
then get the Access DataErr 2169
Microsoft Access
You can't save this record at this time.
Microsoft Access may have encountered and error while trying to save a
record.
If you close this object now, the changes you made will be lost.
Do you want to close the object anyway?
Yes No
The form that I open has the functionality of this message box (and gives a
better description of what is wrong and how to correct it) and I would like
to display that instead. I have tried coding the Form_Unload event to do
this but the message box above appears before the Unload event executes. I
have also tried coding the Form_Error event to catch this error and try to
supress the message but can't seem to get that to work either. Does anyone
have any sugestions as to how I can get this to work properly?
TIA,
Neil.