Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multi select Listbox needed to populate a table field

Status
Not open for further replies.

manrique83

Programmer
Apr 26, 2005
36
US
I couldn't find a concrete answer to my question in any of the other threads.

I have a listbox that is supposed to populate a field in my database after the user has selected a choice. It works fine if the multiselect is set to 'None' but I needed to be Simple or Extended. If i do that, when the user clicks on multiple values, the corresponding field in the table wont be updated.

I assume I need code to do this but I wouldn't have an idea as to how to write it.

My form has other textboxes and combo boxes that are updating one table after the user tabs until it has reached the end and a new empty form begins. The textboxes and combo boxes update fine, but my listbox doesn't.

Any help?
 
Have a look at the ItemsSelected property of the ListBox object.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
If it has multiselect set then it no longer has a value and you would need to use code to go thru the items selected index to see what is selected in the listbox.

In a propery designed database each field holds 1 value so if the listbox is bound to a field there should be no need to have any more the one selection.
 
Thanks guys,

I took a look at the ItemsSelected property and I knew of its properties. My problem is that I am fairly new to VBA and I wouldn't know how to store the selected items in my table field.

And yes, I need it to be multiselect because the entry can be 1 or various options.

Can you guys help.
 
because the entry can be 1 or various options
Have a look here:

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top