Limiting Records in Subform

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hello.
How can I limit the number of records in a subform to 50 records?

Thanks.
Iram/mcp
 
In the SQL used for the SubForm RecordSource add Top 50

Select Top 50 TableName.* From TableName
 
On the OnCurrent event of the SubForm you can write the code

If Me.RecordsetClone.RecordCount > 49 Then
Me.AllowAdditions = False
Else
Me.AllowAdditions = True
End If
 

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

Back
Top