
add several product at once
Quote:
>Hello,
>I use an "order" form very much like the one in the Northwind sample
>database to select products.
>It works fine, but the problem is that we have several kits that include
>several items, and we need all those in the order subform.
>So, how can I click a button or some other control and add automatically 4-5
>products in my subform.
>Thanks,
>P-A
You may want to create two new tables: a table of Kits, related
many-to-many to the table of Products by a table KitContents.
You could have the combo box which selects products based on a UNION
query, showing all the products (from one query) and all the kits
(from this Kits table). Then in the AfterUpdate event of the combo,
you could check to see if a kit was ordered; if so, the code could run
an Append query appending that kit's list of products.
Or, you could just add the kits to the Products list (which might
require some trickery with the inventory, but again
John W. Vinson[MVP]
Come for live chats every Tuesday and Thursday
http://go.compuserve.com/msdevapps?loc=us&access=public