a couple of nested IIf() functions in a calculated field in a query should
do it, as
CalcCode: IIf(LeadTime = 7, "A", IIf(LeadTime = 14, "B", "C")) & IIf(Margin
<= .07, "A", IIf(Margin < .12, "B", "C"))
hth
"mccloud" <(E-Mail Removed)> wrote in message
news

57FE475-A9B1-4484-8853-(E-Mail Removed)...
> Table:IMINVLOC contains the two values
> Leadtime and Margin%
>
> Leadtime - has one of 3 values. (7,14,21)
> 7=A, 14=B, 21=C
> Margin% is the second field. Margin% ranges from 0% - 100%
> Less than 7%=A
> Less Than 12% but greater than 7%=B
> Greater than 12%=C
>
> I need to compare each value and assign a value. Example...(AA, AB, AC)
>
> Here is an example...
> Item:1234 has a lead time 7 and a margin% of 9%, so I want to assign a
value
> of "CB"
>
> Whats the best way of comparing and assign this value.
> Thanks
>
>
>
>