Is there a way to loop through controls on a continuous form? On an exit command, I would like to see if any check boxes on a continuous subform are checked. I am running into the problem that if I select 2 boxes, and then deselect one....on exit the focus is on the de-selected box and it lets me exit. I have tried a few different things, but cant figure it out. Below is the code I used. Thanks for nay help in advance.
'Dim rsClone As Recordset
'Dim rsClone2 As Recordset
'Set rsClone = Forms![frmItemMaint]![subfrmOpenItems].Form.RecordsetClone
'Set rsClone2 = Forms![frmItemMaint]![subfrmClearedItems].Form.RecordsetClone
'If rsClone.RecordCount <> 0 Then
' If Forms![frmItemMaint]![subfrmOpenItems]!txtChkClr = True Then
' MsgBox "You Cannot Exit a Rec with Selected Pending or Unselected Cleared Items outstanding.", vbOKOnly
' Exit Sub
' End If
'End If
'If rsClone2.RecordCount <> 0 Then
' If Forms![frmItemMaint]![subfrmClearedItems]!txtChkClr = False Then
' MsgBox "You Cannot Exit a Rec with Selected Pending or Unselected Cleared Items outstanding.", vbOKOnly
' Exit Sub
' End If
'End If
'Set rsClone = Nothing
'Set rsClone2 = Nothing
'Dim rsClone As Recordset
'Dim rsClone2 As Recordset
'Set rsClone = Forms![frmItemMaint]![subfrmOpenItems].Form.RecordsetClone
'Set rsClone2 = Forms![frmItemMaint]![subfrmClearedItems].Form.RecordsetClone
'If rsClone.RecordCount <> 0 Then
' If Forms![frmItemMaint]![subfrmOpenItems]!txtChkClr = True Then
' MsgBox "You Cannot Exit a Rec with Selected Pending or Unselected Cleared Items outstanding.", vbOKOnly
' Exit Sub
' End If
'End If
'If rsClone2.RecordCount <> 0 Then
' If Forms![frmItemMaint]![subfrmClearedItems]!txtChkClr = False Then
' MsgBox "You Cannot Exit a Rec with Selected Pending or Unselected Cleared Items outstanding.", vbOKOnly
' Exit Sub
' End If
'End If
'Set rsClone = Nothing
'Set rsClone2 = Nothing