Just wonder if anyone could give me some help on an IIF function used in my query:
I have a table which has numerous “W” codes, the charging for an order does not occur if it has a W12 or a W14 code and has no “[Authorising Name]” BUT does however charge if the weight of the order is over 100kg
IIf([WCode]="W12" Or [WCode]="W14",IIf([Authorising Name]="",0,[charge], IFF ([weight]>99,[charge],0)))
I can get this working for a single W code but not for the 2 OR I can get it working for both Codes but then the weight side doesn’t.
I have tried all combinations of <> = < etc etc but still no luck., I think I need another OR but no matter where I put it I hit problems either with the function or the result.
Another small issue, my [authorising Name] field can appear to be empty, but in the field are spaces what is the best way for ensuring I capture both empty and theses space records ?
Thanks in advance
I have a table which has numerous “W” codes, the charging for an order does not occur if it has a W12 or a W14 code and has no “[Authorising Name]” BUT does however charge if the weight of the order is over 100kg
IIf([WCode]="W12" Or [WCode]="W14",IIf([Authorising Name]="",0,[charge], IFF ([weight]>99,[charge],0)))
I can get this working for a single W code but not for the 2 OR I can get it working for both Codes but then the weight side doesn’t.
I have tried all combinations of <> = < etc etc but still no luck., I think I need another OR but no matter where I put it I hit problems either with the function or the result.
Another small issue, my [authorising Name] field can appear to be empty, but in the field are spaces what is the best way for ensuring I capture both empty and theses space records ?
Thanks in advance