Require confirmation to edit

W

WK

Once a record is entered and saved in a form, how do I
require a confirmation to save any changes made to the
form's data?
Thanks.
 
W

Wayne Morgan

In the form's BeforeUpdate event, try something similar to this

If Not Me.NewRecord Then
If Msgbox("Do you really want to make these changes?",
vbYesNo+vbQuestion, "Verify Changes") = vbNo Then
Cancel = True
Me.Undo
End If
End If
 
W

WK

I copied and pasted your code in the form's BeforeUpdate
property. When I did the "If Msgbox("Do you really want
to make these changes?",
vbYesNo+vbQuestion, "Verify Changes") = vbNo Then
" lines were red. When I tried it I got a Compile error,
Syntax error.
Thanks
 
W

Wayne Morgan

The line you mentioned broke into 2 lines because of the way the newsreader
works. It should be all one line. I just pasted in myself to double check it
for a typo, if it is all put on one line, it's not red.
 
W

WK

That worked.
Thanks a bunch!
-----Original Message-----
The line you mentioned broke into 2 lines because of the way the newsreader
works. It should be all one line. I just pasted in myself to double check it
for a typo, if it is all put on one line, it's not red.

--
Wayne Morgan
MS Access MVP





.
 

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