There must be an easier way to do this than the way I'm going about it. I want to filter a list box with user selected values from 3 combo boxes. The user should have the option of selecting a value in one, many, all or none of the boxes.
The way I've handled it in the past and the way I'm trying to handle it now is to set it up so that the rowsource for the list box is built at runtime in code based on the selections made in each combo box. However, it's getting too complicated due to the number of possible combinations and I've also been unable to get it to work in all situations.
Note that I can't use the:
Like "*" & forms!FrmName!cboName
format in the rowsource query because that seems to fail (gives me more than I've asked for) whenever there are more than 9 items listed in the combo box. That is, if I try to filter by the value with an ID of "2", I'm also going to get the value with an ID of "20" since 2 is technically "Like" 20.
Using:
forms!FrmName!cboName
Or: forms!FrmName!cboName Is Null
doesn't seem to work either.
Any suggestions would be greatly appreciated. I'm about to lose my marbles and I really want to get this done!
Thanks!
The way I've handled it in the past and the way I'm trying to handle it now is to set it up so that the rowsource for the list box is built at runtime in code based on the selections made in each combo box. However, it's getting too complicated due to the number of possible combinations and I've also been unable to get it to work in all situations.
Note that I can't use the:
Like "*" & forms!FrmName!cboName
format in the rowsource query because that seems to fail (gives me more than I've asked for) whenever there are more than 9 items listed in the combo box. That is, if I try to filter by the value with an ID of "2", I'm also going to get the value with an ID of "20" since 2 is technically "Like" 20.
Using:
forms!FrmName!cboName
Or: forms!FrmName!cboName Is Null
doesn't seem to work either.
Any suggestions would be greatly appreciated. I'm about to lose my marbles and I really want to get this done!
Thanks!