How to limit the subform records

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to put code to limit the number of records of subform.

I mean I want user to enter only 10 records in the subform.

Once the 10 record is entered, it will not allow any further entry/disable
to new entry.

Please advise a code or sample mdb to get this solution.

Regards

Irshad
 
On the On Current Event of the sub form write the code

If Me.RecordsetClone.RecordCount >= 10 Then
Me.AllowAdditions = False
Else
Me.AllowAdditions = True
End If
 
Back
Top