Results 1 to 4 of 4
  1. #1
    rocky143ch is offline Novice
    Windows 8 Access 2007
    Join Date
    Apr 2014
    Posts
    4

    Run Query Based On Radio Button

    hello friends,

    I am new to this forum. I am posting an example database to solve my problem. I had a database with '4' fields and a query which display '4' fields. I have designed a form with four radio buttons and assigned the name as table field name.

    Now my Question is The Query output should display the fields based on my selection i.e., which radiobutton I tick only that fields should display in my query. How to do it...I am attaching the database kindly complete it and mail to rocky143ch@gmail.com




    Thanking you Friends.
    Attached Files Attached Files

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Would have to save 4 different query objects and have code open appropriate one. Or code would have to modify one query object using QueryDefs collections.

    Why do you need to do this?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    rocky143ch is offline Novice
    Windows 8 Access 2007
    Join Date
    Apr 2014
    Posts
    4
    I cant understand what you said. My theme is we had an option called 'show' when we are in query design mode( to show or hide the field in a query). Is there any way to check and uncheck that 'show' property of a query using 'checkbox' or 'radiobutton' by placing the 'checkbox' or 'radiobutton' on form without opening the query in designmode

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    That is modifying the query with VBA code that manipulates QueryDefs collection. A bit advanced coding concept for new user.

    Otherwise, bind form to the table or query and use code to:

    1. hide controls that are bound to the fields - form in Single view

    2. hide columns - form in Datasheet view as a subform, the main form would have the radio buttons


    Still, why do you need this? What are you really trying to accomplish?
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Uncheck Radio Button?
    By taimysho0 in forum Programming
    Replies: 2
    Last Post: 06-29-2012, 03:44 PM
  2. radio button label with & char
    By jscriptor09 in forum Programming
    Replies: 3
    Last Post: 04-19-2012, 08:19 AM
  3. Option/Radio Button Problem
    By benthamq in forum Forms
    Replies: 6
    Last Post: 09-16-2011, 09:48 AM
  4. radio button and checkbox
    By Fifa in forum Access
    Replies: 2
    Last Post: 01-19-2011, 10:20 AM
  5. Radio Button Select in WebBrowser
    By access_man in forum Access
    Replies: 3
    Last Post: 10-27-2010, 05:29 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