I want to compare two values. The value that is on my form and the value(s) that are in the query. Ex: "If Value on form for [Cond] is "A" and true; & value for that field in the query is: E, G, A, F, or P. I want to calculate a value. There are 5 different values that can be on Form. E,G,A,F,P (So in my query I will have 5 different statements similiar to one below)
AdjACond: IIf ([Forms]![frmSubject]![Cond] Like ‘A’, IIf ([Cond] Like ‘E’, -.20 * [SalePrice], IIF ([Cond] Like ‘G’, -.10 * [SalePrice], IIF ([Cond] Like ‘A’, 0, IIF ([Cond] Like ‘F’, .10 * [SalePrice], IIF ([Cond] Like ‘P’, .20 * [SalePrice],0))))))
The problem is I keep getting prompted 5 times for 'A', 'E', 'G', 'P' If at each prompt I enter the letter that it prompts me; I get the right value returned. Why am I getting prompted and how do I fix this?
AdjACond: IIf ([Forms]![frmSubject]![Cond] Like ‘A’, IIf ([Cond] Like ‘E’, -.20 * [SalePrice], IIF ([Cond] Like ‘G’, -.10 * [SalePrice], IIF ([Cond] Like ‘A’, 0, IIF ([Cond] Like ‘F’, .10 * [SalePrice], IIF ([Cond] Like ‘P’, .20 * [SalePrice],0))))))
The problem is I keep getting prompted 5 times for 'A', 'E', 'G', 'P' If at each prompt I enter the letter that it prompts me; I get the right value returned. Why am I getting prompted and how do I fix this?