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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mutliple selection list box in Access 1

Status
Not open for further replies.

bigred925

MIS
Jul 6, 2001
15
US
I need to be able to have a user be able to select multiple items from a list box and have them stored in a table.
Is there a way to do this?
 
Set the Multi Select property on the list box to 'Simple', or 'Extended' from the default 'None'. I believe Simple allows you to select multiple lines and extended let's you use the standard windows selection capabilities with the 'Shift' button. You can also set them in code (MyListBox.MultiSelect=1) but would have to experiment to determine the integer values which are probably 0, 1, 2 respectively.

To have them stored in a table would require you to write the code to read all the values, determine which lines are .selected, build the SQL or use a recordset to store them in a table. Access the values of the listbox using the column attribute, such as MyListBox.Column(0)would retrieve whatever is store in the first column of the list box.

Steve King

Steve King Growth follows a healthy professional curiosity
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top