Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I don't want to save the record!!!

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
0
0
I don't want access to save the record when i close the form. Is that possible? How can i do it?<br>thx, Martin
 
Sure,<br><br>To see if the record has changed you can look at the form's dirty property and if it has changed then apply corrective action.<br><br>so, on the close button on click event:<br><br>If Me.Dirty then Sendkeys &quot;{ESC}{ESC}&quot;<br><br><br>WP <p>Bill Paton<br><a href=mailto:wpaton@neptune400.co.uk>wpaton@neptune400.co.uk</a><br><a href=
 
Ok, but i can't close the form.<br>I tried docmd.close but there is just a beep!
 
Marty,<br><br>Copy the form and table to a new db.&nbsp;&nbsp;Zip it and send it to me at:<br><br><A HREF="mailto:william.paton@ubsw.com">william.paton@ubsw.com</A><br><br>WP <p>Bill Paton<br><a href=mailto:wpaton@neptune400.co.uk>wpaton@neptune400.co.uk</a><br><a href=
 
Use the form's Before Update event to undo the entries.<br><br>Private Sub Form_BeforeUpdate(Cancel As Integer)<br>Me.Undo<br>End Sub<br><br>HTH<br>RDH<br><br> <p>Ricky Hicks<br><a href=mailto: rdhicks@mindspring.com> rdhicks@mindspring.com</a><br><a href= > </a><br>
 
Hello. Was reading this problem and have question: can you use this code under your &quot;cancel&quot; button?

Private Sub Form_BeforeUpdate(Cancel As Integer)
Me.Undo
End Sub


Tracy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top