i have 2 standard fields
[Doses]
[TxnType]
i want to have the following occur
IF [TXNTYPE]=R
THEN [DOSES]*(-1)
ELSE [TXNTYPE]
i want to value of this to be stored in [Field3]
is this possible?
jade.skaggs@gmail.com - 31 Jul 2006 22:18 GMT
Run the following update query and it should update all of your rows as
requested.
UPDATE [MyTable] SET [Field3] =
IIf([TXNTYPE]="R",[DOSES]*(-1),[TXNTYPE]);
> i have 2 standard fields
> [Doses]
[quoted text clipped - 8 lines]
>
> is this possible?
jade.skaggs@gmail.com - 31 Jul 2006 22:21 GMT
IIF works as follows so you can use it in a select, or anything for
that matter
IIF( [Condition] , [TRUE Branch] , [FALSE Branch] )
jade.ska...@gmail.com wrote:
> Run the following update query and it should update all of your rows as
> requested.
[quoted text clipped - 14 lines]
> >
> > is this possible?
Ofer Cohen - 31 Jul 2006 23:10 GMT
Using a query you can add another field
Field3: IIF ([TXNTYPE]="R",[DOSES]*-1, [TXNTYPE])
There is no need to store a calculated field, just create a query that
display the desire resault
Select TableName.* , IIF ([TXNTYPE]="R",[DOSES]*-1, [TXNTYPE]) As Field3
From TableName

Signature
Good Luck
BS"D
> i have 2 standard fields
> [Doses]
[quoted text clipped - 8 lines]
>
> is this possible?