Mulitple List box selection pushed to datasheet to add other info

cturner

Registered User.
Local time
Today, 17:42
Joined
Feb 7, 2005
Messages
21
I am trying to make a user friendly form where the user can select mulitple items from a list box and then from that selection this info is listed in another table (Form) where they can add additional info.

For example,

List box lists Products to be made (1,2,3,4)
If I choose item 3 and 4 i want them to be listed in a seperate form where I can add more info (quantity).
Any help or other suggestions is appreciated.
 
Code:
   Dim varItm As Variant  
   For Each varItm In myListBox.ItemsSelected
      'Do whatever you want with the stuff here (myListBox.Column(0, varItm))
   Next varItm
This code could go behind a button, or whatever else you wanted to trigger it, like a double-click.
 
What next

Thanks for your help but I have one question in the area where you say do what you want how do I push my selection to a form? I didn't get an error on my selection but it also didn't do anything?

Thanks again.
 
I'm sorry. I forgot to follow-up on this. You would do something like
Code:
   Dim varItm As Variant  
   For Each varItm In myListBox.ItemsSelected
      myOtherListBox.RowSource = myOtherListBox.RowSource & _
         """" & myListBox.Column(0, varitm) & """;"
   Next varItm
I use something similar, anyway. When the user adds a quantity, you could add it in Column(1) I think.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom