Acces radio buttons

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • FBIagent
    New Member
    • Jan 2010
    • 6

    #1

    Acces radio buttons

    Hi,

    I want to create two radio buttons which can select gender (V for man and M for women). I've read
    Staring from scratch:

    1. Click and turn off the Control Wizards from the menu (icon has a magician's wand and fairy dust on it)
    2. Place an Option Group frame on the form; an Option Group frame, not a standard frame!
    3. Place a radio button (or checkbox, your choice) on the Option Group; as said, you need to wait until the inside of the frame changes from gray to black before releasing the button
    4. Repeat this until you have all your buttons in place
    at this page and it worked fine but i want to create radio buttons which shows a result from a table than then i select a radio button it don't change any data in table until i press my created update button. Here is image for clearer view :):

    Hope i explain my problem quit clear :) waiting for the answers as soon as possible :)
  • ADezii
    Recognized Expert Expert
    • Apr 2006
    • 8834

    #2
    Assuming your Option Group is named optGender, and your Options are Man (Option Value = 1) and Woman (Option Value = 2), in the AfterUpdate() Event of the Option Group place the following code substituting your Sub-Form and Field Names for those given:
    Code:
    Private Sub optGender_AfterUpdate()
    If Me![optGender].Value = 1 Then
      Me![<Sub-Form Control>].Form![<Field Name>] = "Man"
    Else
      Me![<Sub-Form Control>].Form![<Field Name>] = "Woman"
    End If
    End Sub

    Comment

    • FBIagent
      New Member
      • Jan 2010
      • 6

      #3
      Thx man that works great.

      Comment

      Working...