Access Forms (Stopping a form saving data)

A

Adam

Is there a way of stopping a MS access form saving data when it has been
closed?

Any help would be appreciated
 
A

Allen Browne

Cancel the form's BeforeUpdate event procedure, and Undo it:

Private Sub Form_BeforeUpdate(Cancel As Integer)
Cancel = True
Me.Undo
MsgBox "Your changes were cancelled"
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top