[AccessD] Problem with IIF statement
Kaup, Chester
Chester_Kaup at kindermorgan.com
Wed Dec 4 10:08:58 CST 2019
Thank You very much. Been looking at it too long.
-----Original Message-----
From: AccessD [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Gustav Brock via AccessD
Sent: Wednesday, December 04, 2019 10:01 AM
To: Access Developers discussion and problem solving
Cc: Gustav Brock
Subject: Re: [AccessD] Problem with IIF statement
[This email message was received from the Internet and came from outside of Kinder Morgan]
Hi Chester
Try with this correction:
ProducerCount: IIf(Nz([Oil],0)+Nz([Wtrp],0)+Nz([HCGas],0)+Nz([Co2P],0)>0,1,0)
/gustav
-----Oprindelig meddelelse-----
Fra: AccessD <accessd-bounces at databaseadvisors.com> På vegne af Kaup, Chester
Sendt: 4. december 2019 16:57
Til: 'Access Developers discussion and problem solving' <accessd at databaseadvisors.com>
Emne: [AccessD] Problem with IIF statement
I have the following IIF statement
ProducerCount: IIf(Nz([Oil],0+Nz([Wtrp],0)+Nz([HCGas],0)+Nz([Co2P],0))>0,1,0)
The value of Oil, Wtrp and CO2P are 0. The value of HCGas is 7258. The result of the IF statement is 0
I tried adding all 4 values together and got a sum of 7258. All values are defined a type double in the source table.
I don't understand what is happening. Maybe there is a better way to write the query.
Thanks for your assistance.
--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com
More information about the AccessD
mailing list