i have a list box with multiselect option
i want to have a select query based on the items that user selects. the problem is it works with the last seleted item not all selected items. i don't know what i am doing wrong. Thanks
my code
For Each varItm In ctlanalytes.ItemsSelected
Debug.Print ctlanalytes.ItemData(varItm)
Next
sqlanalyte = "select " & ctlanalytes.ItemData(varItm) & " from tblanalyte"
i want to have a select query based on the items that user selects. the problem is it works with the last seleted item not all selected items. i don't know what i am doing wrong. Thanks
my code
For Each varItm In ctlanalytes.ItemsSelected
Debug.Print ctlanalytes.ItemData(varItm)
Next
sqlanalyte = "select " & ctlanalytes.ItemData(varItm) & " from tblanalyte"