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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Limit records in subform

Status
Not open for further replies.

icsupt

MIS
Jun 14, 2004
150
US
I have a subform that I would like to only be able to limit 18 records. Is there a way to do this?

Thanks in advance.
 
Look at the TopValues property in Access help. You can use this to return a specified number of records.

Top 18 or top 25.

Just curiuos, why 18 and is there a common denominator that binds those 18 records?

ProDev, MS Access Applications
Visit me at ==>
May God bless you beyond your imagination!!!
 
You could try the on current event of the form to check how many records are alredy entered, then toggle the .AllowAdditions property

[tt]if me.recordsetclone.recordcount>18 then
me.allowadditions=false
else
me.allowadditions = true
end if[/tt]

You may have to use a

[tt]me.recordsetclone.movelast[/tt]

prior to the test.

Roy-Vidar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top