Multi select list boxes to pass selected results to a report

  • Thread starter Thread starter Davidac
  • Start date Start date
D

Davidac

Hi,
i currently have a multi select list box which is populated from a query. i
need to be able to use my selections to pass the results to a report which
runs from the same query. could anyone give me som assistance. my VBA coding
is very basic.
 
Code might look Something like

Dim varItem As Variant, strIn as String

For Each varItem In lstBox.ItemsSelected
' This is where you do something with each Item that was Selected
' We are just appending them one at a time to a string in this
example
strIn = strIn & lstBox.ItemData(varItem) & ", "
Next varItem
' At this point you have a Comma Delimited List of Selected Items
Debug.Print Left(strIn, Len(strIn)-1)

Rdub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top