Results 1 to 4 of 4
  1. #1
    DWhit12692 is offline Novice
    Windows 7 64bit Access 2013 64bit
    Join Date
    Mar 2018
    Posts
    2

    Cool Multiple Option Buttons - Different Combinations Run Different Queries

    Hey Everyone!



    Fairly new to Access.

    I have two option buttons on different parts of my form that are not in a group and i don't want them to be in a group.

    I am trying to build the event for a button on my form to do the following:
    If option 1 is true and option 2 is true, run query A
    If option 1 is true and option 2 is false, run query B
    If option 1 is false and option 2 is true, run query C
    If option 1 is false and option 2 is false, run query D

    HOWEVER, i cant get the second scenario (option 1 true and option 2 false) to work even if i set it as the only IF statement. Access runs the Else query no matter what. (Sorry if my lingo isn't quite right... I'm an Excel guy)

    I am able to get the correct query to run using [Option47].[Value]=True And [Option22].[Value]=True
    But [Option47].[Value]=True And [Option22].[Value]=False goes straight to the Else.

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    What exactly is your code? Is it possible Option22 is Null rather than False?

    FYI, informative names will help you in the long run.
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    DWhit12692 is offline Novice
    Windows 7 64bit Access 2013 64bit
    Join Date
    Mar 2018
    Posts
    2
    Quote Originally Posted by pbaldy View Post
    What exactly is your code? Is it possible Option22 is Null rather than False?

    FYI, informative names will help you in the long run.
    AHHHH!!!! It was such a simple fix. It was indeed "Null" and not "False"! Thank you so much!

    And next time, I'll copy and paste the code. Guess that's way easier than trying to explain everything. Thanks again!

  4. #4
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,652
    No problem and welcome to the site by the way!
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

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

Similar Threads

  1. Replies: 3
    Last Post: 07-22-2017, 12:03 PM
  2. Replies: 3
    Last Post: 11-20-2015, 05:47 PM
  3. Replies: 4
    Last Post: 06-13-2013, 01:02 PM
  4. Option Buttons
    By Cyber27uk in forum Access
    Replies: 1
    Last Post: 01-10-2013, 03:45 PM
  5. Option buttons
    By Ecal in forum Programming
    Replies: 2
    Last Post: 11-11-2012, 09:04 AM

Tags for this Thread

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