How to limit the subform records

I

Irshad Alam

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
 
O

Ofer Cohen

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
 
Top