Unanswered: ListItem vs ItemsSelected - Need help deciphering this MS example....
Quote from MSAccess97 Help.....
The following example prints the value of the bound column for each selected row in a Names list box on a Contacts form. To try this example, create the list box and set its BoundColumn property as desired and its MultiSelect property to Simple or Extended. Switch to Form view, select several rows in the list box, and run the following code:
Dim frm As Form, ctl As Control
Dim varItm As Variant
Set frm = Forms!Contacts
Set ctl = frm!Names
For Each varItm In ctl.ItemsSelected
Could someone tell me how to use Itemselected, (rather than ListItem) to trap the BoundColumn values of multi selections in a list box?
I need these values to run query's on specific records relating to each selected row in the list box, but have no idea how to manipulate MS's example above.
They seem to be printing the selected values from the listbox to screen (I think) - but I need to send the values to a textbox that my queries reference.
By my understanding, 'ListItem' only references the number of the selected row, whereas 'ItemSelected' references the actual values, so I figure that's what I need to use.
Cheers, but tis ok - don't think the multi-select is the way to go on this at all.
For each possible value that's passed to the textbox from the list selection, there are about 10 other values that I need to capture for update queries. The textbox value tells the query which records to change, and I take the values from other textboxes populated on the on click event of the list, to tell the query what the updates to make actually are. (This does work!!)
Can't see how this'd work using multiselect, so I've thought of another way just using individual selections.