Access My Expression Contains Wrong number of arguments

Joined
Dec 18, 2017
Messages
1
Reaction score
0
I'm trying to add an IF to my already existing expression in my database base. I'm trying to add MG to calculate as a new UOM. The expression works and calculates correctly without the addition of the final IF of the "MG" uom. It keeps giving me the error that my expression contains the wrong number of arguments. I tried adding a ) to the end of the expression and that didn't work. I tried deleting one and still no go. Any help would be greatly appreciated.


Amt Base: IIf([Controlled Substance Name]="Morphine Oxycodone Mix",0,IIf([Controlled Substance Name]="Butalbital Codeine Mix",0,IIf([Controlled Substance Name]="Amphetamine WIP FIN",0,IIf([UOM]="EA",[Quantity]*[Number of Tabs or Caps per EA]*[Strength]/1000*[Conversion Factor],IIf([UOM]="KG",[Quantity]*[Percent Active]*1000*[Conversion Factor],[Quantity]*[Percent Active]*[Conversion Factor],IIf([UOM]="MG",[Quantity]/1000*[Percent Active]*[Conversion Factor]))))))
 
Back
Top