View Single Post
  #2  
Old April 27th, 2008, 10:23 AM posted to microsoft.public.access.forms
Steve Schapel
external usenet poster
 
Posts: 1,422
Default Limited sub records to 5 records only

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.

--
Steve Schapel, Microsoft Access MVP

New_Project wrote:
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?