On 3 Feb 2005 07:50:59 -0800, "(E-Mail Removed)" <(E-Mail Removed)>
wrote:
>I have a query that has four columns in it, along with others, that I
>need to reduce into one.
>
>The data could look like this:
>
>PL1 PL2 PL3 PL4
>20P 20P
> 40P
....
>Nesting IIf statements would be a little much. Is there a function for
>this type of thing?
The Switch() function can be used here:
PLAdj: Switch(Not IsNull([PL1]), [PL1], Not IsNull([PL2]), [PL2], Not
IsNull([PL3]), [PL3], Not IsNull([PL4]), [PL4], True, Null)
either as a calculated field or in an Update query if you actually add
the PLAdj field to your table.
This might be a good idea - these four fields are improperly
normalized on two counts already!
John W. Vinson[MVP]
|