I am getting an error when trying to cancel my form's BeforeUpdate event. It says:
You can't save this record at this time.
ACH Manager 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?
Here is my code:
When I commented out the Cancel = True, then there was no problem. Of course there was a problem saving the record. I CANCELLED the saving of the record. What is going wrong?
You can't save this record at this time.
ACH Manager 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?
Here is my code:
Code:
Private Sub Form_BeforeUpdate(Cancel As Integer) If Me.PINVerified = False Then Cancel = True MsgBox ("This transaction is not complete and changes will be canceleld.") End If End Sub
Comment