Ask cofirmation for changes on main- and subform

J

John J.

I use following code in my main form's beforeUpdate event for the not so
advanced users.

If msgbox("Do you wish to update this record?", vbYesNo) = vbNo Then
Cancel = True
Me.Undo
msgbox "The change has been discarded", vbOKOnly
End If

It works for the main form but not for the subform. I could add the same
code to the sub form too, but then the user may get the update question
twice. Would it somehow be possible to combine those 2 pieces of code into 1
so that a message only pops up once, when the user leaves the record on the
main form?
Thank you.
John
 
D

Dale Fye

John,

See the thread shown below for some discussion of this type topic.

date: 8/29/08
title: don't save subform data on form dirty
in :Access Database General Questions (microsoft.public.Access)

--
HTH
Dale

Don''t forget to rate the post if it was helpful!

email address is invalid
Please reply to newsgroup only.
 
J

John J.

thanks
john

Dale Fye said:
John,

See the thread shown below for some discussion of this type topic.

date: 8/29/08
title: don't save subform data on form dirty
in :Access Database General Questions (microsoft.public.Access)

--
HTH
Dale

Don''t forget to rate the post if it was helpful!

email address is invalid
Please reply to newsgroup only.
 

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