L
LeLe
Our employees often filter our customer data base by either city or zip code.
I have set up an unbound control for each on the customer form. The
underlying query uses the following 2 expressions.
IIf(IsNull([forms]![CompaniesSplitView]![FltCityCbx]),"
",[Forms]![CompaniesSplitView]![FltCityCbx]) to filter based on the value
selected in the FltCityCbx or
IIf(IsNull([forms]![CompaniesSplitView]![FltZipCbx]),"
",[Forms]![CompaniesSplitView]![FltZipCbx]) to filter based on the value
selected in the FltZipCbx.
Either one of these works great if it is the only expression in the query,
but I can't seem to get either of them working if both on are the query.
I think I understand why, but I don't know how to fix it. I believe it has
to do with the Null value, since neither city or zip is ever Null. I think
what I need to do is elimate the city filter when the user select zip, and
eliminate the zip filter when the user selects city. Can I do this in my
query by revising the expression?
thanks so much
I have set up an unbound control for each on the customer form. The
underlying query uses the following 2 expressions.
IIf(IsNull([forms]![CompaniesSplitView]![FltCityCbx]),"
",[Forms]![CompaniesSplitView]![FltCityCbx]) to filter based on the value
selected in the FltCityCbx or
IIf(IsNull([forms]![CompaniesSplitView]![FltZipCbx]),"
",[Forms]![CompaniesSplitView]![FltZipCbx]) to filter based on the value
selected in the FltZipCbx.
Either one of these works great if it is the only expression in the query,
but I can't seem to get either of them working if both on are the query.
I think I understand why, but I don't know how to fix it. I believe it has
to do with the Null value, since neither city or zip is ever Null. I think
what I need to do is elimate the city filter when the user select zip, and
eliminate the zip filter when the user selects city. Can I do this in my
query by revising the expression?
thanks so much