A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Limited sub records to 5 records only



 
 
Thread Tools Display Modes
  #1  
Old April 27th, 2008, 03:34 AM posted to microsoft.public.access.forms
New_Project
external usenet poster
 
Posts: 1
Default Limited sub records to 5 records only

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?


  #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?


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:33 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.