I want to be able to cancel the data entry of a record. For this question the user is entering data into a simple table containing a primary key field and a data field. The input form contains the two fields and a cancel button. No VBA code is currently in place as Access is handling all recordset activities.
Half way through adding a record’s data field the user is interrupted and, wishing to end the session, presses the cancel button. As this constitutes moving the cursor off of the current record, I know of no way to prevent Access from adding this bad record to the table.. I would like, I think, to put code into Cancel_Click to a) prevent Access from adding the incomplete record, or back up to the record just added and call the Delete method. I have tried simplistic things like Me!.MovePrevious but access couldn’t match the method with the object. How can I prevent this bad record from existing without the user having to manually open the underlying table and delete it?
Thank you.