jcaulfield
Board Regular
- Joined
- Nov 23, 2012
- Messages
- 50
I am trying to run a query using criteria from a form. The criteria has a combo Box with 3 options All, Expense, or Income. With the following 2 formulas I get the correct results if I select "Income" or "Expense", but get nothing if select all.
[TABLE="class: cms_table, width: 675"]
<tbody>[TR]
[TD]IIf([forms].[sourcesSelect].[Cbx_IncExp]="All",<>"zzz",[forms].[sourcesSelect].[Cbx_IncExp])[/TD]
[/TR]
[TR]
[TD]IIf([Forms].[SourcesSelect].[Cbx_IncExp]="All",Is Not Null,[Forms].[SourcesSelect].[Cbx_IncExp])
[/TD]
[/TR]
</tbody>[/TABLE]
If I eliminate the formula and enter <>"zzz" or "Is not Null", I get all records. Why doesn't my iif statement work? suggestion greatly appreciated.
Any help would be greatly appreciated.
Sincerely,
Stumped.
[TABLE="class: cms_table, width: 675"]
<tbody>[TR]
[TD]IIf([forms].[sourcesSelect].[Cbx_IncExp]="All",<>"zzz",[forms].[sourcesSelect].[Cbx_IncExp])[/TD]
[/TR]
[TR]
[TD]IIf([Forms].[SourcesSelect].[Cbx_IncExp]="All",Is Not Null,[Forms].[SourcesSelect].[Cbx_IncExp])
[/TD]
[/TR]
</tbody>[/TABLE]
If I eliminate the formula and enter <>"zzz" or "Is not Null", I get all records. Why doesn't my iif statement work? suggestion greatly appreciated.
Any help would be greatly appreciated.
Sincerely,
Stumped.