cynteeuh wrote:
I have a main form that has a number field (this field inidcates the number
of seats available). I want the subform to only allow the user to enter data
in rows that are equal or less than than the number field in the main form.
please help with code and best place to enter.
many thanks!!!
You need to use a RecordsetClone to get the count of records in the subform.
Then in the BeforeInsert event, check that
If RecordsetClone.RecordCountMAX_CHILD_RECORDS Then
'MsgBox...
Cancel = True
End If
--
Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/201003/1