Results 1 to 4 of 4
  1. #1
    BRV is offline Novice
    Windows XP Access 2007
    Join Date
    Oct 2011
    Posts
    29

    How to stop a Option Group Value from changing?

    I'm adding a "user confirmation" to respond to changing an option group value by clicking the appropriate toggle button.

    I have code in place to check if the form is "dirty" and pop up a confirmation dialog if it is. It works beautifully.

    The problem is that if I place the code in the option group's BeforeUpdate sub and use Cancel=True, it doesn't stop the fact that the value has already been changed.



    If I use .Undo, it undoes the other data that was entered (that I'd like to keep).

    I'm not sure where else to go from here. Any suggestions?

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Try Me.ControlName.UnDo instead.
    ...using *your* ControlName of course.

  3. #3
    BRV is offline Novice
    Windows XP Access 2007
    Join Date
    Oct 2011
    Posts
    29
    Thanks, RuralGuy.

    I tried that, but unfortunately, it didn't work. Not sure why. It seems like it should...

    I finally brokedown and assigned the value to a variable to hold it in memory and reassigned it back to the control to undo the change. There should be a better way, but I guess it works, so at least I can move on.

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Whatever works for you.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Option Group
    By x__hoE__x in forum Access
    Replies: 2
    Last Post: 12-10-2011, 09:39 AM
  2. Stop Access Changing My Data
    By R3mix3r in forum Access
    Replies: 5
    Last Post: 09-11-2011, 10:33 PM
  3. changing a check-box to an option box
    By lbn in forum Access
    Replies: 3
    Last Post: 08-14-2011, 02:25 PM
  4. Option Group - Borders are gone
    By cevatyildiz in forum Forms
    Replies: 0
    Last Post: 04-30-2010, 06:08 AM
  5. Option Group
    By huskies in forum Forms
    Replies: 9
    Last Post: 12-02-2009, 12:06 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums