boredguy2000
Programmer
All,
I am attempting to use a list box with multiple possible entries to populate a filtered form. As of now I have dependent combo boxes that work perfectly fine but for this permutation I want the user to be able to pick let's say 1-6 states, have the filtered form(s) open with the header displaying the chosen state(s) and the detail section being the... well details. I have found code that seems perfect:
DIM varItem As Variant
DIM strWhere As String
For Each varItem In Me![YourListBoxName].ItemsSelected
strWhere =strWhere & Me![YourListBoxName].Column(0,varItem)
Next varItem
I am just not quite getting it to fit correctly, and seemingly don't have it doing much of anything. I have changed the one Combo Box to a list box and with multi not selected it works just as before but with multiple the form opens up as if it is getting passed nothing at all.
Sorry so long, I have never posted here and thought the most details possible would garner the best results. Thanks in advance everyone. I have been reading this forum for quite some time and have used literraly 50-100 of you guru's help tips!
Brandon
I am attempting to use a list box with multiple possible entries to populate a filtered form. As of now I have dependent combo boxes that work perfectly fine but for this permutation I want the user to be able to pick let's say 1-6 states, have the filtered form(s) open with the header displaying the chosen state(s) and the detail section being the... well details. I have found code that seems perfect:
DIM varItem As Variant
DIM strWhere As String
For Each varItem In Me![YourListBoxName].ItemsSelected
strWhere =strWhere & Me![YourListBoxName].Column(0,varItem)
Next varItem
I am just not quite getting it to fit correctly, and seemingly don't have it doing much of anything. I have changed the one Combo Box to a list box and with multi not selected it works just as before but with multiple the form opens up as if it is getting passed nothing at all.
Sorry so long, I have never posted here and thought the most details possible would garner the best results. Thanks in advance everyone. I have been reading this forum for quite some time and have used literraly 50-100 of you guru's help tips!
Brandon