Don't want the record to be saved on form exit.

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Here is my problem: Even if I put DoCmd.Close , , acSaveNo in the Click
event of my exit button, it still save the current information partially
enter in the form.

How can I prevent this to append. I want the record to be save only if I
press on my Save record button.

Yanick.
 
Hi,

When you close a form using Docmd.Close any changes that are saved are to
the design of the form itself not to records that the form is based on.

By default closing a form will save any changes currently pending in the
forms buffer. If you do not wish to save these changes then Undo the last
edit before closing.

HTH
Mark.
 
The only way to be absolutely certain of this is to use an unbound form.
This will give you the maximum control of when the record is saved. Of
course, there are disadvantages as well. You have to fill the form with
code and save the record with code as well, but if preventing the saving of
a record is your main concern, then an unbound form is the best.

On my website (www.rogersaccesslibrary.com), are two small Access sample
databases called: "Unbound.mdb" and "UnboundSQL.mdb", which illustrate two
different approaches for using unbound forms.

--
--Roger Carlson
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L
 
Back
Top