I have some text boxes for data entry. I have five text boxes if I fill in
one or two text boxes and then exit the program it will save the information
in the DB that has been entered. I need it to disregard any information
typed in if the application is closed.
Thanks
This is what you need. To make this happen you then have to do as is
suggested for the BeforeUpdate event by testing that all the controls
have been filled in and if not then invoking the form.Undo method.
UNDO METHOD
--------------
You can use the Undo method to reset a control or form when its value
has been changed. For example, you can use the Undo method to clear a
change to a record that contains an invalid entry.
Syntax
object.Undo
The Undo method has the following argument.
Argument Description
object A Form object or a Control object.
Remarks
If the Undo method is applied to a form, all changes to the current
record are lost. If the Undo method is applied to a control, only the
control itself is affected.
This method must be applied before the form or control is updated. You
may want to include this method in a form's BeforeUpdate event or in a
control's Change event.
The Undo method offers an alternative to using the SendKeys statement
to send the value of the ESC key in an event procedure.
Brett
Cheers,
Brett