"What I want to be able to do is not allow the user to enter any data into a particular record until one
or more (out of 6 or 7) check boxes have been checked."
So you have 6 or 7 check boxes, they're at the top or left of the screen
somewhere, and they have to check at least one of them before they enter
data on the form. . .
Use OnOpen and/or OnCurrent for the form, disable all of the
text boxes, and toggle the enabled state as they check the boxes. . .
Private Sub Form_Current() Call TextBoxes(False) End Sub Private Sub TextBoxes(whichway As Boolean) Me!SomeOtherControl.SetFocus For Each ctl in frm.Controls If ctl.ControlType = acTextBox Then ctl.Enabled = whichway End If End For End Sub
For each of the checkboxes, add an OnClick:
Private Sub Check1_Click() Call IsItOK End Sub ' Private Sub Check2_Click() Call IsItOK End Sub '
Private Sub IsItOK() With Me If .Check1 Or .Check2 Or .Check3 ... etc etc Then Call TextBoxes(True) Else Call TextBoxes(False) End If End With End Sub
This is kind of a "brute force" approach, but if you add or remove text
boxes it will still keep working.