Results 1 to 4 of 4
  1. #1
    Lounger
    Join Date
    Jul 2001
    Posts
    39
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Check Box Form Fields (Word 2000)

    I created a form containing two Check Box Form Fields. They are Male and Female. The problem is the user can choose both. How can I make it so that if the user chooses Male they can't choose Female or if they choose male and then click on female, male will automatically be deselected and female selected. Basically I want them to work like radio buttons.

  2. #2
    Plutonium Lounger
    Join Date
    Nov 2001
    Posts
    10,550
    Thanks
    0
    Thanked 7 Times in 7 Posts

    Re: Check Box Form Fields (Word 2000)

    Use option buttons instead of check boxes.

    StuartR

  3. #3
    Lounger
    Join Date
    Jan 2001
    Location
    Harrisburg, Pennsylvania, USA
    Posts
    44
    Thanks
    1
    Thanked 2 Times in 2 Posts

    Re: Check Box Form Fields (Word 2000)

    This might be worth a try:
    Since you only get check boxes as an option in a form, I would create two macros to run on Exit and Entry of the field.

    For the Female check box, run this on entry & exit:
    Sub FemOnly()
    If ActiveDocument.FormFields("FemaleCheck").Result = Checked Then
    ActiveDocument.FormFields("MaleCheck").Result = Unchecked
    Else
    ActiveDocument.FormFields("FemaleCheck").Result = Unchecked
    End If
    End Sub

    And for the Male Check Box:
    Sub MaleOnly()
    If ActiveDocument.FormFields("MaleCheck").Result = Checked Then
    ActiveDocument.FormFields("FemaleCheck").Result = Unchecked
    Else
    ActiveDocument.FormFields("MaleCheck").Result = Unchecked
    End If
    End Sub

    Obviously, you'd have to make sure that you use the correct names for your check boxes - I just tried to make mine clear between boy/girl.

    Hope you find this helpful!

  4. #4
    Silver Lounger Charles Kenyon's Avatar
    Join Date
    Jan 2001
    Location
    Sun Prairie, Wisconsin, Wisconsin, USA
    Posts
    2,049
    Thanks
    124
    Thanked 119 Times in 116 Posts
    Charles Kyle Kenyon
    Madison, Wisconsin

Posting Permissions

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