I have tried to post this on a previous thread, but it sticks for some reason
When one of the "everyday" boxes is checked, you have to
[*] Uncheck all other check boxes
[*] Hide or disable the other check boxes until the "everyday " check box is unchecked.
One way to do this is as follows.
Private Sub CheckEveryday_AfterUpdate()
Dim x As Integer
Dim CheckDay As Variant
'--------------------------------
CheckDay = Array("CheckMon", "CheckTue", "CheckWed","CheckThu", CheckFri, "CheckSat", "CheckShopClosed")
For x = 0 To 6
If CheckEveryday Then
Me(CheckDay(x)) = 0
Me(Checkday(x)).Enabled= 0
Else: Me(CheckDay(x)).Enabled= 1
End If
Next
Set Checkday=Nothing
End Sub
Replace the strings in my array with the names of your checkboxes.
You will need another of these procedures in the AfterUpdate event of your "EverydayExceptWhen ShopClosed" checkbox,. Then, the last element in your array will be "CheckEveryday" instead of "CheckShopClosed". The IF clause will need to be changed to "If CheckShopClosed"...etc
Let me know how you get on!
When one of the "everyday" boxes is checked, you have to
[*] Uncheck all other check boxes
[*] Hide or disable the other check boxes until the "everyday " check box is unchecked.
One way to do this is as follows.
Private Sub CheckEveryday_AfterUpdate()
Dim x As Integer
Dim CheckDay As Variant
'--------------------------------
CheckDay = Array("CheckMon", "CheckTue", "CheckWed","CheckThu", CheckFri, "CheckSat", "CheckShopClosed")
For x = 0 To 6
If CheckEveryday Then
Me(CheckDay(x)) = 0
Me(Checkday(x)).Enabled= 0
Else: Me(CheckDay(x)).Enabled= 1
End If
Next
Set Checkday=Nothing
End Sub
Replace the strings in my array with the names of your checkboxes.
You will need another of these procedures in the AfterUpdate event of your "EverydayExceptWhen ShopClosed" checkbox,. Then, the last element in your array will be "CheckEveryday" instead of "CheckShopClosed". The IF clause will need to be changed to "If CheckShopClosed"...etc
Let me know how you get on!