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
 
Back
Top