I have read some of your responses in regards to multi-selct list boxes and
have tried your multi-select code for a form I have. It only works for
one
field on my form. I have several "AutoID" fields...
I have been trying to get each filter to work independantly with the
intent
of making them work together later.
This works:
'Model Filter
With Me.Combo_Mod
For Each varMod In .ItemsSelected
'Build filter using AutoID
strMod = strMod & .ItemData(varMod) & ","
Next
End With
'Remove trailing comma, add field name, IN operator, and brackets
l_Mod = Len(strMod) - 1
If l_Mod > 0 Then
strMod = "[AutoID] IN (" & Left$(strMod, l_Mod) & ")"
End If
This doesn't:
'Vendor Filter
With Me.Combo_vend
For Each varVend In .ItemsSelected
strVend = strVend & .ItemData(varVend) & ","
Next
End With
l_Vend = Len(strVend) - 1
If l_Vend > 0 Then
strVend = "[AutoID] IN (" & Left$(strVend, l_Vend) & ")"
End If
What syntax do I use when I have multiple fields with the same name that
come from two different tables?
--
-CLSWL
Allen Browne said:
See:
Use a multi-select list box to filter a report
at:
http://allenbrowne.com/ser-50.html