From: CAM on 20 May 2010 21:00 Hello, I am using Access 2003 I have a query where I add three fields together into a new field in the same query, the problem is if one of the three fields don't have an amount I get this #Error. Does anyone knows how to deal with this. Thank you in advance.
From: PieterLinden via AccessMonster.com on 20 May 2010 21:58 CAM wrote: >Hello, > >I am using Access 2003 I have a query where I add three fields together into >a new field in the same query, the problem is if one of the three fields >don't have an amount I get this #Error. Does anyone knows how to deal with >this. >Thank you in advance. use NZ() to convert the null value to zero, then you can add it. Total: NZ([Field1],0) + NZ([Field2],0) ... -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/Forums.aspx/access-queries/201005/1
From: CAM on 21 May 2010 22:35 Thanks for your help! Cheers, "PieterLinden via AccessMonster.com" <u49887(a)uwe> wrote in message news:a8503402827a2(a)uwe... > CAM wrote: >>Hello, >> >>I am using Access 2003 I have a query where I add three fields together >>into >>a new field in the same query, the problem is if one of the three fields >>don't have an amount I get this #Error. Does anyone knows how to deal >>with >>this. >>Thank you in advance. > > use NZ() to convert the null value to zero, then you can add it. > > Total: NZ([Field1],0) + NZ([Field2],0) ... > > -- > Message posted via AccessMonster.com > http://www.accessmonster.com/Uwe/Forums.aspx/access-queries/201005/1 >
|
Pages: 1 Prev: Querying 2 field unless duplicated Next: Crosstab queries, <> and null values |