Check all Records

R

Rob

I have a form that shows records based on a query. I would like to check
each record to ensure that some criteria is met. Here is the code I have
thus far:

If (Forms!frmInitialTR!ChkUnaccept = True And Forms!frmInitialTR!TxtOccur =
0) Then
Beep
MsgBox "You have checked Unacceptable for an Activity with no
indication of the number of Occurrences!!", vbOKOnly, "Occurrences?"
DoCmd.SetWarnings True
End
End If
DoCmd.SelectObject acForm, "frmTRInitiate", False
=
DoCmd.OpenQuery "qryupdateOcc/Observ", acViewNormal, acEdit
DoCmd.OpenQuery "qryCalcElaspedTime", acViewNormal, acEdit
DoCmd.Close acForm, "frmChklist"
DoCmd.Close acForm, "frmInitialTR"
DoCmd.Close acForm, "frmTRInitiate"
DoCmd.Close acForm, "frmWRExist"
DoCmd.SetWarnings True
DoCmd.OpenForm "Switchboard", acNormal, "", "", , acNormal
DoCmd.Save , ""


Notice the "If" statement. This works fine if it is checking just one
record but if multiple records have have "ChkUnaccept = True and TxtOccur is
0 these records don't get checked and the docmd's are performed. How do I
get the code to check each record and at the end to do the docmd's if all
records are ok.

Thanks in Advance,

Rob
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top