Limiting Records in Subform

I

Iram

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

Thanks.
Iram/mcp
 
O

Ofer

In the SQL used for the SubForm RecordSource add Top 50

Select Top 50 TableName.* From TableName
 
I

Iram

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

Ofer

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
 
Top