By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,087 Members | 1,520 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,087 IT Pros & Developers. It's quick & easy.

Cancel Change In Option Group

P: n/a
Is there a way to cancel a change in an option group? The option group still
changes to the option clicked on when clicking on the NO button with the
following code in the BeforeUpdate event of the option group.

If MsgBox("Change?", vbYesNo) = vbNo Then
Cancel = True
End If

Thanks!

Corrine
Nov 13 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
"Corrine" <cm****@earthlink.net> wrote in message
news:Xp***************@newsread2.news.atl.earthlin k.net...
Is there a way to cancel a change in an option group? The option group still changes to the option clicked on when clicking on the NO button with the
following code in the BeforeUpdate event of the option group.

If MsgBox("Change?", vbYesNo) = vbNo Then
Cancel = True
End If


Canceling the update is not the same as undoing the entry. In addition to
what you have now you need...

Me.OptionGroupName.Undo
--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com
Nov 13 '05 #2

P: n/a
Rick,

Thank you for responding! I added the line of code you suggested and still get
the option group going to the option I click on. Here is my complete code:

Private Sub Frame5_BeforeUpdate(Cancel As Integer)
If MsgBox("Change?", vbYesNo) = vbNo Then
Me!Frame5.Undo
Cancel = True
End If
End Sub

I tried Me!Frame5.Undo under Cancel = True also!

Corrine
"Rick Brandt" <ri*********@hotmail.com> wrote in message
news:2i************@uni-berlin.de...
"Corrine" <cm****@earthlink.net> wrote in message
news:Xp***************@newsread2.news.atl.earthlin k.net...
Is there a way to cancel a change in an option group? The option group

still
changes to the option clicked on when clicking on the NO button with the
following code in the BeforeUpdate event of the option group.

If MsgBox("Change?", vbYesNo) = vbNo Then
Cancel = True
End If


Canceling the update is not the same as undoing the entry. In addition to
what you have now you need...

Me.OptionGroupName.Undo
--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com

Nov 13 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.