When I choose an item from combo drop down list it will allow only one sentence to pick up. Is there any way I can pick up multiple items from one combo box.
Thanx
You didn't say you wanted to populate a field with the selection (which is usually a bad idea - multiple values in a single field break any normalization rules)
But...just because it's possible:
For each itm in Me.ListBoxName.ItemsSelected
FieldName = FieldName & Me.ListBoxName.ItemData(itm) & ", "
Next
Thanks again danvlas but i'm new to access and i'm not quite sure what this means "For each itm in Me.ListBoxName.ItemsSelected
FieldName = FieldName & Me.ListBoxName.ItemData(itm) & ", "
Next"
could you please explain what to do
Thanks
Hi,
Change the list box property MultiSelect to Extended
then
To select more than one item:
Click and Shift+Click for adjacent items.
Click and Ctrl+Click for non-adjacent items.
That's code...
Put a text box on the form (call it MyTextBox or whatever)
Put a command button on the form.
Right click the button and choose Build event - Code builder
Then paste the code where the cursor blinks
Dim itm
For each itm in Me.ListBoxName.ItemsSelected
Me.MyTextBox = Me.MyTextBox & Me.ListBoxName.ItemData(itm) & ", "
Next
Open the form, select a few items and click the button.
The text box will be populated with your selection, items separated by comma.
It's somehow advanced for your level of Access knowledge.
But it's simple for an intermediate user.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.