The code below by WatsonDyar works to limit number of records entered in a form.
Private Sub Form_BeforeInsert(Cancel As Integer)
If Me.NewRecord = True And Me.RecordsetClone.RecordCount = 3 Then
MsgBox "Cannot add more than 3 rating officials. Press OK to continue.", vbOKOnly, "Maximum Number of Rating Officials Met"
DoCmd.GoToRecord , , acPrevious
End If
End Sub
I want to limit number of records entered in a form PER MONTH. Each month should have only a maximum of 5 records. How do I do this? tia.
Private Sub Form_BeforeInsert(Cancel As Integer)
If Me.NewRecord = True And Me.RecordsetClone.RecordCount = 3 Then
MsgBox "Cannot add more than 3 rating officials. Press OK to continue.", vbOKOnly, "Maximum Number of Rating Officials Met"
DoCmd.GoToRecord , , acPrevious
End If
End Sub
I want to limit number of records entered in a form PER MONTH. Each month should have only a maximum of 5 records. How do I do this? tia.