Update table based on multi-select listbox

danikuper

Registered User.
Local time
Today, 15:31
Joined
Feb 6, 2003
Messages
147
Hi!

I've successfully created a form with two listboxes, using Access help, that works the following way:

- lstSource has a list of names based on a table

- cmdSelect is a button that will copy selected items from lstSource to the other list box

- lstDestination is the list box that receives selected items from lstSource when the button is pressed

- Invoicenumber: text field where the user can type in an invoice number

I have another table that has the fields: Name, Invoicenumber

The idea is that the user opens the form, types in the invoice number and selects the names from the first list box. When he clicks the button to copy the names to the second listbox, I want to store those selected names in my table where each name will be a separate record. For example, if the invoice number is 105 and the names selected from the lstSource are "John", "Mary" and "Bill", when the user clicks the button the table will record the following:

105 John
105 Mary
105 Bill

Does anyone know how to accomplish this??

thanks in advance!!!
:)
 
Could you be more specific, Pat?

How would you accomplish that with a combo box and a subform? It may be simple but it's something that has not occured to me.

Thanks!!
 
Yes!

Northwind has a great set of forms (suppliers and products) that gave me some insight on how to perform what I was looking for.

Thanks a lot!
 

Users who are viewing this thread

Back
Top Bottom