Results 1 to 7 of 7

Thread: Option Buttons

  1. #1
    kbahr99
    Guest

    Option Buttons

    I am converting a database that was originally created in Access 2.0. The original designer was quite a programmer and used some complex VBA code. I upgraded it to 97 last year. Now I am trying to upgrade it to 2000. For some reason, the 97 code doesn't work in 2000. I decided to scrap the code and make the design a little easier to deal with.

    I ended up designing a form that uses option button groups whose settings determine which query is run to filter another form.

    My question is: How do I use an IF/Then statement to determine if a certain option is selected. I looked at OptionValue, but that will not change depending on what is selected. (or am I totally off base).

    Thanks for any help you can give me.

  2. #2
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts

    Re: Option Buttons

    Hi,
    If your option group is called Frame1 you would use something like:
    If Me!Frame1 = 1 then
    do something
    Else
    Don't
    End If
    Is that what you were looking for?
    Regards,
    Rory

    Microsoft MVP - Excel

  3. #3
    kbahr99
    Guest

    Re: Option Buttons

    Yes that worked great. Thanks. [img]/w3timages/icons/smile.gif[/img]

  4. #4
    3 Star Lounger
    Join Date
    Dec 2000
    Location
    Ohio - USA, Ohio, USA
    Posts
    294
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Option Buttons

    Interesting Rory, I was working on something this evening and your response came in very handy. I have been making it a practice to read anything that you have turned your pen (keyboard) to.

    Thanks

    "CD"

  5. #5
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts

    Re: Option Buttons

    That's a dangerous habit, CD![img]/w3timages/icons/grin.gif[/img]
    Still, as long as Charlotte's keeping watch over the forum, you should be safe....
    Regards,
    Rory

    Microsoft MVP - Excel

  6. #6
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Option Buttons

    Why, Rory! I didn't realize I had to watch over it. I thought that what <big>you</big> were doing!
    Charlotte

  7. #7
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts

    Re: Option Buttons

    True, but someone's got to watch over me![img]/w3timages/icons/smile.gif[/img]
    Regards,
    Rory

    Microsoft MVP - Excel

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •