Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Controlling the Number of Entered Records in a Subform

Status
Not open for further replies.

instructorgirl

Instructor
Mar 14, 2005
40
US
I have a main form called frmShipping and a subform called frmUnits. I want to control how many units can be entered into the subform for a given shipping record, i.e. from 1 to 7. I don't want them to be allowed to enter more than seven records. Do I need to do this with a query in the subform or is there a property that I can set? Any help would be greatly appreciated. Thanks!
 
In the Current event procedure of frmUnits (typed, untested):
Me.AllowAdditions = (Me.RecordsetClone.RecordCount - Me.NewRecord) < 7


Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top