G
Guest
Hi,
i have a subform that i filter based on some combo boxes at the top of the
main form that the user can type into.
i have a search method that is called using the following:
call searchMethod(Nz(box1.value, ""), Nz(boz2.value,"") , ..... )
this search method then builds up an sql string to filter the records. this
works well.
when i initially load the form up, i have a minor problem. all of the
records are shown, because all of the box values are "", and so there is
effectively no filter.
i actually want the opposite of this. i.e if the user doesnt select
anything, then i want no records to be shown at all.
SOME of the boxes can be null at any one time, just not all of them.
is there a way that i can say "if all of the boxes are null, dont return any
records" with a filter?
thanks as always,
ben
i have a subform that i filter based on some combo boxes at the top of the
main form that the user can type into.
i have a search method that is called using the following:
call searchMethod(Nz(box1.value, ""), Nz(boz2.value,"") , ..... )
this search method then builds up an sql string to filter the records. this
works well.
when i initially load the form up, i have a minor problem. all of the
records are shown, because all of the box values are "", and so there is
effectively no filter.
i actually want the opposite of this. i.e if the user doesnt select
anything, then i want no records to be shown at all.
SOME of the boxes can be null at any one time, just not all of them.
is there a way that i can say "if all of the boxes are null, dont return any
records" with a filter?
thanks as always,
ben