autosave

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

Guest

I there a way to be prompted before the data on a form is automatically saved?
 
Use the BeforeUpdate event procedure of the form. That's the only way to
catch all the possible ways a record might get saved.

1. Set the form's Before Update property to:
[Event Procedure]

2. Click the Build button (...) beside this.
Access opens the code window.

3. Set up the code like this:

Private Sub Form_BeforeUpdate(Cancel As Integer)
If MsgBox("Save?", vbYesNo) = vbNo Then
Cancel = True
'Me.Undo
End If
End Sub
 
Thank-you!
--
:)


Allen Browne said:
Use the BeforeUpdate event procedure of the form. That's the only way to
catch all the possible ways a record might get saved.

1. Set the form's Before Update property to:
[Event Procedure]

2. Click the Build button (...) beside this.
Access opens the code window.

3. Set up the code like this:

Private Sub Form_BeforeUpdate(Cancel As Integer)
If MsgBox("Save?", vbYesNo) = vbNo Then
Cancel = True
'Me.Undo
End If
End Sub

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

Ruth said:
I there a way to be prompted before the data on a form is automatically
saved?
 
Ruth said:
Thank-you!
--
:)


Allen Browne said:
Use the BeforeUpdate event procedure of the form. That's the only way to
catch all the possible ways a record might get saved.

1. Set the form's Before Update property to:
[Event Procedure]

2. Click the Build button (...) beside this.
Access opens the code window.

3. Set up the code like this:

Private Sub Form_BeforeUpdate(Cancel As Integer)
If MsgBox("Save?", vbYesNo) = vbNo Then
Cancel = True
'Me.Undo
End If
End Sub

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

Ruth said:
I there a way to be prompted before the data on a form is automatically
saved?
 

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

Back
Top