I would like to limit the number records entered per main form on my subform. Is this possible? For instance, for every order placed, I only want the customer to add three items and their descriptions the subform.
Specifically quoting the example above, if I wanted to limit the number of line items on the invoice (the subform on the main form), I would put something like this on the "add line item" button;
Code:
if me.SubFormContainer.form.recordsetclone.recordcount = 3 then
msgbox "This order has been fulfilled, please submit the order to place another."
exit sub
end if
You can of course use the OnCurrent event of the subform in conjunction with Cancel=True with the previous example but maintaining the inbuilt nav buttons