Hey all,
So here's what I already have coded successfully:
In Frame 1 I have option buttons for:
and in Frame 2 I have Checkboxes for- Monday
- Tuesday
- Wednesday
- Thursday
- Friday
- Saturday
- Sunday
So far, I've made it so that when you click the "All Days" option, checks in the Monday - Sunday boxes automatically appear
when you click the "Weekdays" option, checks in the Monday - Friday boxes automatically appear
when you click the "Other" option, all checkboxes are set to false so the user can select individual days.
What I need, is for the option buttons to change with the checkboxes. So if the user clicks "Other" but checks the Monday - Friday boxes, then the "Weekdays" option would switch to "true". If all of the days are checked, the "All days" option button would be set to "True". If any combination of days other than Mon-Fri and Mon-Sun are checked, then the "Other" option would be set to "True".
Essentially, the Option buttons change the check boxes only. I need the Option buttons to change the check boxes and the check boxes to change the Option buttons.
Here's the code so far:
(option buttons are OptAllDays, OptWeekdays, and OptOther)
Thank you!
Private Sub OptAllDays_Click()
If OptAllDays = True Then
Me.CbMonday = True
Me.CbTuesday = True
Me.CbWednesday = True
Me.CbThursday = True
Me.CbFriday = True
Me.CbSaturday = True
Me.CbSunday = True
Else
Me.CbMonday = False
Me.CbTuesday = False
Me.CbWednesday = False
Me.CbThursday = False
Me.CbFriday = False
Me.CbSaturday = False
Me.CbSunday = False
Me.CbSaturday = False
Me.CbSunday = False
End If
End Sub
Private Sub OptWeekdays_Click()
If OptWeekdays = True Then
Me.CbMonday = True
Me.CbTuesday = True
Me.CbWednesday = True
Me.CbThursday = True
Me.CbFriday = True
Me.CbSaturday = True
Me.CbSunday = True
Me.CbSaturday = False
Me.CbSunday = False
End If
End Sub
Private Sub OptOther_Click()
If OptOther = True Then
Me.CbMonday = False
Me.CbTuesday = False
Me.CbWednesday = False
Me.CbThursday = False
Me.CbFriday = False
Me.CbSaturday = False
Me.CbSunday = False
Me.CbSaturday = False
Me.CbSunday = False
End If
End Sub
Bookmarks