Referential integrity - cancel record

hbrems

has no clue...
Local time
Today, 23:00
Joined
Nov 2, 2006
Messages
181
I have refential integrity turned on in my relational database.

Suppose a record is created by accident in a form and the user wants to cancel this record he will get a prompt saying that the record needs a value in the related field.

How to abort a record with vba (so I can create a cancel button)?
 
Me.Undo

the above should work if you put it on the forms Class Module
 
Actually I've just found the following:

RunCommand acCmdUndo
RunCommand acCmdRecordsGoToPrevious

Is this also valid?
 
I have refential integrity turned on in my relational database.

Suppose a record is created by accident in a form and the user wants to cancel this record he will get a prompt saying that the record needs a value in the related field.

How to abort a record with vba (so I can create a cancel button)?

Although not perhaps as neat and foolproof as a Cancel button, if the User didn't intend to enter anything in just one field but the rest of the form is valid they can always exit the field by pressing Esc and left or right arrow.
 

Users who are viewing this thread

Back
Top Bottom