View Full Version : ItemsSelected


michael albert
03-17-2000, 08:42 AM
Does anyone have some sample code for displaying the items selected from a combo box.

I created a combo box and can select multiple rows (it is a table of employees), but I am having trouble displaying the data

Thanks

Travis
03-17-2000, 05:53 PM
Look no further here a sample:

Dim ctl As Control
Dim varItm As Variant
Dim cAmount As Currency

Set ctl = Me!lstPayments

For Each varItm In ctl.ItemsSelected
cAmount = cAmount + ctl.Column(3, varItm)
Next varItm

This sample adds the amounts together of selected items. But the basic code for going through is there without any extra flair.

Hope this helps