Ask cofirmation for changes on main- and subform

  • Thread starter Thread starter John J.
  • Start date Start date
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
 
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.
 
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.
 
Back
Top