ListBox values past to query as parameters

L

Lillian

I would like to use ListBox values (1 or more) in a query
and need help with the code. I need to be able to use the
items in the list to filter the query.

So far I have this much...

Public Sub RowsSelected()
Dim ctlList As Control, varItem As Variant

Set ctlList = Forms!frmReports!filterbox
For Each varItem In ctlList.ItemsSelected
Debug.Print ctlList.ItemData(varItem)
Next varItem
End Sub

HELP! Please.

Lillian
 

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

Top