Taking user confirmation to save changes before update

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

Guest

My form draws data from a table and displays it for the user to edit it. I
want to obtain user confirmation that the chages made are to be saved, before
actually committing them to the database. How can I do this (using Access
2000)
 
Use the BeforeUpdate event procedure of the *form*.

Private Sub Form_BeforeUpdate(Cancel As Integer)
If MsgBox("Save?", vbYesNo) = vbNo Then
Cancel = True
'Me.Undo
End If
End Sub
 
hi,
if Msgbox("i'm going to update the table if you click yes.
are you sure you want me to do
this?",vbyesno,"confirm")= vbyes then
Run code to update
else
msgbox ("update canceled")
exit sub
end if
 
Back
Top