StevenSkub
New member
- Local time
- Today, 13:57
- Joined
- Sep 17, 2020
- Messages
- 10
Hello! I usually never post but I really cannot find a solution to my problem anywhere online.
I am trying to use the does not contain expression "<>" within an IIf statement in my query criteria and I cannot get it to work properly.
I am trying to set things up so that when Combo35 has "HorizonLLC" selected, only records with "HorizonLLC" in the CompName field are returned. When Combo35 has "Contractor" selected, all records that DON'T contain "HorizonLLC" are returned. Finally, if neither are selected, all records are returned. Right now it is working as intended except for the "Contractor" situation.
This is what I have in the Criteria box:
IIf([forms]![frmReports]![Combo35]="HorizonLLC","HorizonLLC",IIf([forms]![frmReports]![Combo35]="Contractor",<>"HorizonLLC",[CompName]))
And when I have the following in there it does give me the non-HorizonLLC values so I don't see why it's not working within the IIf statement:
<> "HorizonLLC"
Any help is greatly appreciated!
I am trying to use the does not contain expression "<>" within an IIf statement in my query criteria and I cannot get it to work properly.
I am trying to set things up so that when Combo35 has "HorizonLLC" selected, only records with "HorizonLLC" in the CompName field are returned. When Combo35 has "Contractor" selected, all records that DON'T contain "HorizonLLC" are returned. Finally, if neither are selected, all records are returned. Right now it is working as intended except for the "Contractor" situation.
This is what I have in the Criteria box:
IIf([forms]![frmReports]![Combo35]="HorizonLLC","HorizonLLC",IIf([forms]![frmReports]![Combo35]="Contractor",<>"HorizonLLC",[CompName]))
And when I have the following in there it does give me the non-HorizonLLC values so I don't see why it's not working within the IIf statement:
<> "HorizonLLC"
Any help is greatly appreciated!