How to detect if all checkboxes are disabled?
Solution 1:
Exit the loop as soon as you find an enabled checkbox:
Dim Args As Variant
Dim i As Integer
Dim ctl As Control
Dim bCheck As Boolean
bCheck = False
If Not IsNull(Me.OpenArgs) Then
Args = Split(Me.OpenArgs, ";")
Me.txtForm = Args(0)
Me.lblChoices.Caption = Args(1)
End If
For Each ctl In Forms(Me.Name).Controls
If ctl.ControlType = acCheckBox Then
ctl.Value = False
If ctl.Enabled Then
bCheck = True
Exit For 'stop checking
End If
End If
Next
If bCheck Then
fncMsgBox "Labor has been entered for all bundles on this step."
DoCmd.Close acForm, Me.Name
End If
Note: you don't need = True
in your If
when the value you're checking already represents a boolean.