Hi,
I have a form with several check boxes on it. I would like all the check boxes to be enabled for each new record, until the user selects just 1 of these check boxes, and when they do, the other checkboxes become disabled. Unless they click their selection for a second time, effectively clearing the tick and opening up all 5 options again.
A section of my form looks like
Which area do you live in or are nearest to?
Location1 [checkbox1]
Location2 [checkbox2]
Location3 [checkbox3]
Location4 [checkbox4]
Location5 [checkbox5]
I appreciate that this would be easier with a combo box listing the choices, however I am trying to mimic the look of a multiple choice survey on the form for some continuity for the data entry and also for easier verifying that the paper questionnaire has been entered correctly.
I have had a few attempts and the closest I seemed to have got is
Private Sub CheckBox1_AfterUpdate()
If CheckBox = -1 Then
Checkbox2.Enabled = False
Checkbox3.Enabled = False
Checkbox4.Enabled = False
Checkbox5.Enabled = False
Else
Checkbox2.Enabled = True
Checkbox3.Enabled = True
Checkbox4.Enabled = True
Checkbox5.Enabled = True
End If
End Sub
I applied the same after update event to each check box, chaging out which boxes I wanted enabled or disabled accordingly. This seemed to work until I moved to a new record, the checkboxes would still be greyed out apart from the 1 checkbox which was active from the previous record.
Any advice would be greatly appreciated!
Thanks in advance
I have a form with several check boxes on it. I would like all the check boxes to be enabled for each new record, until the user selects just 1 of these check boxes, and when they do, the other checkboxes become disabled. Unless they click their selection for a second time, effectively clearing the tick and opening up all 5 options again.
A section of my form looks like
Which area do you live in or are nearest to?
Location1 [checkbox1]
Location2 [checkbox2]
Location3 [checkbox3]
Location4 [checkbox4]
Location5 [checkbox5]
I appreciate that this would be easier with a combo box listing the choices, however I am trying to mimic the look of a multiple choice survey on the form for some continuity for the data entry and also for easier verifying that the paper questionnaire has been entered correctly.
I have had a few attempts and the closest I seemed to have got is
Private Sub CheckBox1_AfterUpdate()
If CheckBox = -1 Then
Checkbox2.Enabled = False
Checkbox3.Enabled = False
Checkbox4.Enabled = False
Checkbox5.Enabled = False
Else
Checkbox2.Enabled = True
Checkbox3.Enabled = True
Checkbox4.Enabled = True
Checkbox5.Enabled = True
End If
End Sub
I applied the same after update event to each check box, chaging out which boxes I wanted enabled or disabled accordingly. This seemed to work until I moved to a new record, the checkboxes would still be greyed out apart from the 1 checkbox which was active from the previous record.
Any advice would be greatly appreciated!
Thanks in advance