Question : Undoing a record

I am building a database that I need to make as robust and "idiot-proof" as possible. For the latter, this means that every eventuality has to have a user friendly outcome to a non-computer person.
This case involves undoing a record that is partially entered by the user. In particular, when a field is keyed but the user decides to clear it by backspacing and then clicking away from the record, I need that record not to be saved in the table.
I have included a sample database and a Word document with a few illustrations. The database has some code for "Before Update" for the Form and for the Field.
Firstly, is what I want to do possible? Secondly my code produces unexpected messages when in tracing mode, but different ones when there are no breakpoints.
Please assist.
Thanks in anticipation.

Answer : Undoing a record

<I believe I know the solution, but I would welcome opinions from others.>>

 When it comes to subforms, you have two options:

1. Bind the main and subform in code so you can use a transaction

2. use temp tables - when the user edits or adds, you copy everything to the temp tables.  If they save, you copy back.  If they cancel, you simply don't do anything.

 The problem with a main/subform combination is that Access comits the main form record when you enter a subform (you don't even have to do anything to it).

JimD.

Random Solutions  
 
programming4us programming4us