Results 1 to 3 of 3
  1. #1
    DDEB is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    May 2012
    Posts
    7

    Using Radio Buttons on a Form


    I have a table with a few columns that have data added by a lookup field. This isn't pulling information from another table or anything it's a simple list of choices. Lookup properties example:
    Display Control: Combo Box
    Row Source Type: Value List
    Row Source: 0;5

    When I create a form based on this table my options are displayed with a drop down menu, however I would like it to be displayed using radio buttons. Is there any easy way to change the format from drop down menu to radio buttons (options)? I know I can do this using option groups and setting each up individually but I have about 20 columns so it'll take me quite a long time.

    Any suggestions would be appreciated!

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,929
    I doubt it can be any faster than building one then using copy/paste and editing properties of the copies.
    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
    Missinglinq's Avatar
    Missinglinq is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    May 2012
    Location
    Richmond (Virginia, not North Yorkshire!)
    Posts
    3,018
    Quote Originally Posted by DDEB View Post

    ...When I create a form based on this table my options are displayed with a drop down menu, however I would like it to be displayed using radio buttons.
    Not to be unkind, but you really should have spent a little time learning how Access works as well as planning how you wanted your database to work. You simply cannot jump in, feet first, and hope for the best, and I'm afraid you're going to have to pay the piper for that, to get what you want!
    Quote Originally Posted by DDEB View Post

    ...Is there any easy way to change the format from drop down menu to radio buttons
    No. A Radio Button, for instance, cannot be used to display arbitrary data. Basically their Values are True/Yes (-1) or False/No (0).
    Quote Originally Posted by DDEB View Post

    ...I have about 20 columns so it'll take me quite a long time.
    Then you'd better get started! The only way to set up twenty Controls to do their own thing is to to set up twenty Controls to do their own thing!

    And keep in mind what I said above; Radio Buttons have Values of Yes/No which literally is 0/-1. If you want this to equal, say, 5 or 10, you would have to

    • Create a Field to hold the Data of 5 or 10
    • Set the AfterUpdate event of the Radio Button to assign the Value to it depending on the Value of the Button.

    The second item above could be done using something like this:
    Code:
    Private Sub YourRadioButton_AfterUpdate()
     If Me.YourRadioButton = -1 Then
      Me.TagetField = 5
     Else
      Me.TagetField = 10
     End If
    End Sub
    Using Radio Buttons with an Option Group at least allows you to directly assign a Numeric Value to each choice, through the Wizard, as long as it is an Integer (whole number). The Control, in an Option Group, is the Option Frame itself, not each individual Radio Button.

    And just to re-iterate what you've apparently figured out, here, Comboboxes have their uses, but they are overkill when you are using them to offer one of two possible Values!

    Linq ;0)>
    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

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

Similar Threads

  1. Radio Buttons
    By ccordner in forum Forms
    Replies: 1
    Last Post: 01-27-2012, 09:56 AM
  2. Radio Buttons
    By neil123williams in forum Forms
    Replies: 8
    Last Post: 11-11-2011, 03:38 PM
  3. what happened to radio buttons?
    By judomum in forum Forms
    Replies: 1
    Last Post: 10-09-2011, 11:58 AM
  4. radio buttons from 97 to 2010
    By mmm in forum Access
    Replies: 0
    Last Post: 12-03-2010, 04:20 PM
  5. option group radio buttons
    By ManC in forum Forms
    Replies: 9
    Last Post: 03-08-2010, 03:46 AM

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