Check number of records in subform according to listbox

T

tsuby

Hi everybody,

I solved the problem I had yesterday and I am bothering you again (I
hope it will be the last time for a while!).

I have a form listing orders + subform listing products for the same
order.
When I enter the order in the form I have a listbox for selecting the
number of different products the customer is buying (I don't need to
record how many copies of the same products I am selling, just how many
different products - don't ask me why, it was not my idea!)

Something like FlowersListbox and
1) rose
2) daffodil
3) daisy
4) lily

I have a row for each product and the number of rows has to match the
number I enter in the main form in the listbox:
So if I select 4 in the FlowersListbox I must have 4 different kind of
flowers listed in the subform.
The products are inserted manually. After I finish inserting them I
have a button which locks the subform and prevents any editing. I also
want to perform the check whenever I activate the button.
The button is on the mainform.

Is it possible to do anything like this?
Thanks

Erika
 
Top