How to limit the subform records

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
 
G

Guest

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
 

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

Top