Hi
I have the following code to try to limit records in a subform:
Private sub Form_AfterUpdate()
Dim rs As Dao.Recordset
set rs = Me.RecordsetClone
'limit records to a max of 14
Me.Allow Additions = rs. RecordCount < 14
End Sub
Unfortunately, there is a run time error 91 (object variable or with-block variable not defined) on the line
Me.AllowAdditions = rs.RecordCount < 14
Do you know what is wrong in the code`?
Thanks.
Stefan
I have the following code to try to limit records in a subform:
Private sub Form_AfterUpdate()
Dim rs As Dao.Recordset
set rs = Me.RecordsetClone
'limit records to a max of 14
Me.Allow Additions = rs. RecordCount < 14
End Sub
Unfortunately, there is a run time error 91 (object variable or with-block variable not defined) on the line
Me.AllowAdditions = rs.RecordCount < 14
Do you know what is wrong in the code`?
Thanks.
Stefan