G
Guest
I give the user the option to NOT save a new record if they've changed their
mind by using the following code in the BeforeUpdate event of the form:
If Me.NewRecord Then
If MsgBox("Do you want to save this new document?", vbYesNo) = vbNo Then
Cancel = True
MsgBox "Update was cancelled", vbOKOnly
End If
End If
So, if the user begins to fill in a new form, changes their mind and closes
the form, they will be questioned and can hit NO. However, when they hit NO,
an error message comes up that says:
You can't save this record at this time!
Registrations may have encountered an error while trying to save a record.
If you close this object now, the data changes you made will be lost.
Do you want to close the database object anyway?
YES / NO
How do I keep this error message from coming up?
Thanks
Steve
mind by using the following code in the BeforeUpdate event of the form:
If Me.NewRecord Then
If MsgBox("Do you want to save this new document?", vbYesNo) = vbNo Then
Cancel = True
MsgBox "Update was cancelled", vbOKOnly
End If
End If
So, if the user begins to fill in a new form, changes their mind and closes
the form, they will be questioned and can hit NO. However, when they hit NO,
an error message comes up that says:
You can't save this record at this time!
Registrations may have encountered an error while trying to save a record.
If you close this object now, the data changes you made will be lost.
Do you want to close the database object anyway?
YES / NO
How do I keep this error message from coming up?
Thanks
Steve