C
cherman
I have a check box on a form. If it is checked, I want to filter a query
(Amount field) to show all records > 0. Otherwise I want to show all the
records. I’ve tried to use iif and switch, but both give me the wrong
results. Here is my code.
IIf([Forms]![frmEncumbranceBalancesCriteria]![chkGreaterThanZero]=-1,[qryEncBalance1].[Amount]>0,[qryEncBalance1].[Amount])
Switch([Forms]![frmEncumbranceBalancesCriteria]![chkGreaterThanZero]=0,[qryEncBalance1].[Amount],[Forms]![frmEncumbranceBalancesCriteria]![chkGreaterThanZero]=-1,[qryEncBalance1].[Amount]>0)
Can someone suggest the right way to do this? It seems that when the check
box is checked, I get all records equaling zero, not all records greater than
zero.
Thanks,
Clint Herman
(Amount field) to show all records > 0. Otherwise I want to show all the
records. I’ve tried to use iif and switch, but both give me the wrong
results. Here is my code.
IIf([Forms]![frmEncumbranceBalancesCriteria]![chkGreaterThanZero]=-1,[qryEncBalance1].[Amount]>0,[qryEncBalance1].[Amount])
Switch([Forms]![frmEncumbranceBalancesCriteria]![chkGreaterThanZero]=0,[qryEncBalance1].[Amount],[Forms]![frmEncumbranceBalancesCriteria]![chkGreaterThanZero]=-1,[qryEncBalance1].[Amount]>0)
Can someone suggest the right way to do this? It seems that when the check
box is checked, I get all records equaling zero, not all records greater than
zero.
Thanks,
Clint Herman