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

Multi Select

Status
Not open for further replies.

DocSonEmt

IS-IT--Management
Nov 28, 2000
1
US
Need help with Multi Select Coding. I wish to allow users to view a selection from Combobox. As they select the items the information is stored. The idea is to allow the uers to update multiple records at once. They would fill in dates (Materiel Onsite, Crew Onsite, Projected Completion). Now they would select from the different communication sites(Site 1, Site 4, Site 6, Site 8, ....). Now they click the Update button and then an update query will takes the values stored for that combo box and update each record. Any Ideas here. Thinking of an Array that is increased or decreased as the user clicks on an items. The computer will check the array for that value, and if it doent exist it will add it to the array. If the item is in the array it will delete the item from the array. Am I going in the write direction, or of working a simple task.

Help.
Thanks
 
Doc,

I actually do this a lot but you're going to have to use a ListBox & not a ComboBox. You can make it small enuf to display one or two items if space is an issue.

You really don't need an array then because you can...

This is modified code from Access Help.

Dim varItm As Variant
For Each varItm In Me.MyListBox.ItemsSelected
Debug.Print Me.MyListBox.ItemData(varItm)
'Whatever processing you like
'Code to update records from data in other controls
'Deselect the item
Me.MyListBox.Selected(varItm) = False
'Maybe set some criteria to remove item from RowSource...
Next
'if you need to remove list items...
Me.MyListBox.Requery 'because RowSourceType is query/table

hope this steers you in the right direction

rafe
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top