I have a loop event attached to a field's after update event. Basically, it is supposed to remove the person from a variety of mailing lists if they are determined inactive. The code actually works, but after deleting the last record, it says the command "delete record" is not available right now...
It seems as if this worked at one time without the error message, but either way, does anyone have any suggestions?
Thanks!
'Remove workshops from invitee list based on "still in field"
Dim strInField As String
Dim blnOmit As Boolean
Dim intCount As Integer
strInField = Forms!frmApplicants!StillInField
blnOmit = Forms!frmApplicants!OmitFromMailings
If strInField = "No" Or blnOmit = True Then
DoCmd.GoToControl "sbfInviteeList"
Do Until intCount > 15
DoCmd.RunCommand acCmdDeleteRecord
Loop
intCount = intCount + 1
End If
It seems as if this worked at one time without the error message, but either way, does anyone have any suggestions?
Thanks!
'Remove workshops from invitee list based on "still in field"
Dim strInField As String
Dim blnOmit As Boolean
Dim intCount As Integer
strInField = Forms!frmApplicants!StillInField
blnOmit = Forms!frmApplicants!OmitFromMailings
If strInField = "No" Or blnOmit = True Then
DoCmd.GoToControl "sbfInviteeList"
Do Until intCount > 15
DoCmd.RunCommand acCmdDeleteRecord
Loop
intCount = intCount + 1
End If