473,804 Members | 3,259 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Cancel Change In Option Group

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
2 3345
"Corrine" <cm****@earthli nk.net> wrote in message
news:Xp******** *******@newsrea d2.news.atl.ear thlink.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.OptionGroupN ame.Undo
--
I don't check the Email account attached
to this message. Send instead to...
RBrandt at Hunter dot com
Nov 13 '05 #2
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_BeforeUp date(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*********@ho tmail.com> wrote in message
news:2i******** ****@uni-berlin.de...
"Corrine" <cm****@earthli nk.net> wrote in message
news:Xp******** *******@newsrea d2.news.atl.ear thlink.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.OptionGroupN ame.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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
519
by: Corrine | last post by:
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 Me!MyOptionGroupName.Undo End If I also tried reversing the Cancel and Undo lines.
4
1832
by: Deano | last post by:
Alot of my forms are bound. I would like to offer a Cancel option so that they can make as many changes as they like and still Cancel out without making any changes. I have one idea of how to do this for new records; tag each record with a boolean value. On clicking OK, these are all set to True and the form closes. If they Cancel the False records are deleted and the form closes.
4
7831
by: martin | last post by:
Hello, Is there a way to make a kind of "cancel" button on a form? Suppose you accidently changed or overwrote some data in a form, then I'd like to leave this form at once and cancel any change made in this form. Hopefully someone has a clue for me. thanks a lot!
2
508
by: FAQ server | last post by:
----------------------------------------------------------------------- FAQ Topic - How do I change the confirm box to say yes/no or default to cancel? ----------------------------------------------------------------------- The buttons on a confirm box cannot be changed, nor can you specify a default button. However, you should be able to change the question so that "OK" is suitable as the default. e.g. change "We will now buy ourselves...
5
9884
by: jmarcrum | last post by:
Hey everybody! I've created 2 buttons that I've placed on all my forms: a Save button & a Cancel button. The cancel button I have a question about. I used the wizard to create the button and I selected the Record Operations/Undo Record option. I edited the vba code to have the button also close the form after it undoes any changes. Here is the actual code for the OnClick event for the cancel button: Private Sub cmdCancel_Click()...
6
3513
Frinavale
by: Frinavale | last post by:
I have a control that is supposed to allow the user to either allow or cancel what they were doing. When I apply this to a <select> element (or DropDownList), I cannot save the original value to restore it later. The following JavaScript is a "property" that loops through all of the controls associated with the custom confirm control and adds Listeners depending on the type of control it is. set_AssociatedControlIDs:...
0
9704
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9572
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10319
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10303
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9132
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7608
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5508
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5639
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4282
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.