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!

Selecting multiple items in list box

Status
Not open for further replies.

smoker1

Programmer
Jun 18, 2001
76
US
Hello everyone! Can anyone tell me how a user can select multiple items in a form's list box (and have it save to the related table)?

Thanks in advance for your assistance!

--Angela
 
P.S. I have tried setting the "multi select" property to extended, which will allow me to select multiple values, but it doesn't save any of the selections onto the form.
 
From access help...

The following example prints the value of the bound column for each selected row in a list box EmployeeList on an Employees form. The list box’s MultiSelect property must be set to Simple or Extended.

Sub RowsSelected()
Dim ctlList As Control, varItem As Variant

' Return Control object variable pointing to list box.
Set ctlList = Forms!Employees!EmployeeList
' Enumerate through selected items.
For Each varItem in ctlList.ItemsSelected
' Print value of bound column.
Debug.Print ctlList.ItemData(varItem)
Next varItem
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top