blue60007
07-05-2006, 05:31 PM
OK, I'm running a query on a table, and I need to filter down by input on a form. Here's what I have on the Critieria field for the particular data field:
IIF(IsNull(F_BU()), " (???) ", F_BU())
F_BU() is the returned value (integer) from input... If the user inputs a number then the results are filtered down by that value just fine, BUT if the user leaves the input null, then I don't want to filter down by that field (ie, display all results that made it through the previous filters). If I just leave empty quotes (the " (???) " is what is in question), it filters down by results that have that field null (which there are none of)...I want to display ALL results if the returned value is null. I've tried wildcards and >0 but no luck. Any ideas? Let me know if I need to elaborate/more detail....
TIA
IIF(IsNull(F_BU()), " (???) ", F_BU())
F_BU() is the returned value (integer) from input... If the user inputs a number then the results are filtered down by that value just fine, BUT if the user leaves the input null, then I don't want to filter down by that field (ie, display all results that made it through the previous filters). If I just leave empty quotes (the " (???) " is what is in question), it filters down by results that have that field null (which there are none of)...I want to display ALL results if the returned value is null. I've tried wildcards and >0 but no luck. Any ideas? Let me know if I need to elaborate/more detail....
TIA