Limiting Records in Subform

G

Guest

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

Thanks.
Iram/mcp
 
G

Guest

In the SQL used for the SubForm RecordSource add Top 50

Select Top 50 TableName.* From TableName
 
G

Guest

Thanks. But how do I limit the amount of records to be created to 50 in the
subform?
 
G

Guest

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

Top