By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,737 Members | 1,270 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,737 IT Pros & Developers. It's quick & easy.

insert values from a multiselect listbox in a table

P: 1
Call me ignorant but where is the rest of the code

i have a form and i want the users to be able to select multiple items in a multiselect list box. this looks like it would work but will it send the data back to the table concatenated. i am going CRAZY


Expand|Select|Wrap|Line Numbers
  1. Dim valSelect As Variant
  2. Dim strValue As String ' just used for the demonstration
  3.  
  4.     For Each valSelect In Me.listboxName.ItemsSelected
  5.         strValue = strValue & "'" & Me.listboxName.ItemData(valSelect) & "', "
  6.     Next valSelect
  7.  
  8.     ' to remove trailing comma
  9.     strValue = Left(strValue, Len(strValue)-2)
  10.  
May 30 '07 #1
Share this Question
Share on Google+
1 Reply

MMcCarthy
Expert Mod 10K+
P: 14,534
Call me ignorant but where is the rest of the code

i have a form and i want the users to be able to select multiple items in a multiselect list box. this looks like it would work but will it send the data back to the table concatenated. i am going CRAZY
This is just an example it all depends on what you want to do with the selections.

I am moving this to the Access forum. If you can post details on what you want to do with the selections in your list box we can try to help you.
Jun 1 '07 #2

Post your reply

Sign in to post your reply or Sign up for a free account.