Limited sub records to 5 records only

N

New_Project

Hi all,
I have a form with a subform in it.
I want the records in the subform that relating to the
main form is limited to 5 records only.Usually when we
working with a continuos subform,when we are editing
the first record the second blank new records will show
up.And I want when the user is working at the fifth record,
the sixth blank new record will not showing up.
Is it possible?How to do it?
 
S

Steve Schapel

New Project,

I didn't test, but I think this should work, on the After Update event
of the subform:
Me.AllowAdditions = (Me.RecordsetClone.RecordCount < 5)

You may need something equivalent on the main form's Current event too.
 

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