Filter Report from List Box Selections

cpremo

Registered User.
Local time
Today, 09:43
Joined
Jun 22, 2007
Messages
50
I have a form with a list box, set to "Simple" Multi-Selection. I want to be able to filter reports based on the "Items Selected". I can create a VB Function to "gather" the selections but can't seem to "pass" this to the query. Does anyone have an example of how the did this?

This is the function I'm using to test the process.


*************************************************
Function Test() As Variant

Dim varItm As Variant
Dim ctl As Control
Set ctl = Forms![MainMenu]![ServerList]
For Each varItm In ctl.ItemsSelected

strTest = strTest & "'" & ctl.ItemData(varItm) & "' or "
Next varItm
strTest = Left(strTest, Len(strTest) - 4)

End Function
************************************************
 

Users who are viewing this thread

Back
Top Bottom