R
Rob
I have a database that does a lot of checking to ensure that the proper data
is inserted in the proper fields. In this particular case, I am trying to
verify that if a box "Unacceptable" has been checked, that the user enters
the number of occurrences as well as a note as to why an Activity is
Unacceptable. I have the following code:
With Me.RecordsetClone
..MoveFirst
Do Until .EOF
If .[Unacceptable] = Yes = 0 And .[Occurrence] = 0 Then
MsgBox "You have checked Unacceptable for Activity # " &
Me.RecordsetClone.[Sequence] & "! Add the number of Occurrences!!", vbOKOnly,
"Occurrences?"
Exit Sub
End If
..MoveNext
Loop
End With
With Me.RecordsetClone
.MoveFirst
Do Until .EOF
If .[Unacceptable] = Yes = 0 And .[Notes] & "" = "" Then
MsgBox "You have checked Unacceptable for an Activity # " & .[Sequence]
& "! Add Explanation!!", vbOKOnly, "No Explanation"
Exit Sub
End If
.MoveNext
Loop
End With
End Sub
This works perfectly find for the Parent Form. However I have a subform
that needs to have the same checks and I can't figure out how to get the
program to access the subform control which is "ProcessChecklist" and to run
the same checks. Any help would be greatly appreciated.
is inserted in the proper fields. In this particular case, I am trying to
verify that if a box "Unacceptable" has been checked, that the user enters
the number of occurrences as well as a note as to why an Activity is
Unacceptable. I have the following code:
With Me.RecordsetClone
..MoveFirst
Do Until .EOF
If .[Unacceptable] = Yes = 0 And .[Occurrence] = 0 Then
MsgBox "You have checked Unacceptable for Activity # " &
Me.RecordsetClone.[Sequence] & "! Add the number of Occurrences!!", vbOKOnly,
"Occurrences?"
Exit Sub
End If
..MoveNext
Loop
End With
With Me.RecordsetClone
.MoveFirst
Do Until .EOF
If .[Unacceptable] = Yes = 0 And .[Notes] & "" = "" Then
MsgBox "You have checked Unacceptable for an Activity # " & .[Sequence]
& "! Add Explanation!!", vbOKOnly, "No Explanation"
Exit Sub
End If
.MoveNext
Loop
End With
End Sub
This works perfectly find for the Parent Form. However I have a subform
that needs to have the same checks and I can't figure out how to get the
program to access the subform control which is "ProcessChecklist" and to run
the same checks. Any help would be greatly appreciated.