If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
"nz,0"
I'm using Access 2.0. The query I'm writing requires the
sum of 2 fields. If I use the "nz,0" command to make sure the fields add up even if one of the fields has a null value, I can't sum the new field in a later query without getting the message: "The Microsoft Jet database engine could not execute the SQL statement because it contains a field that has an invalid data type." Is there any way to add (+) 2 fields together, even if one has some null values, and then later sum the new field- using 2.0? Thanks, Todd |
#2
|
|||
|
|||
"nz,0"
You may need to "wrap" your Nz() inside Val()
Val(Nz([YourField],0)) -- Duane Hookom MS Access MVP -- "Todd" wrote in message ... I'm using Access 2.0. The query I'm writing requires the sum of 2 fields. If I use the "nz,0" command to make sure the fields add up even if one of the fields has a null value, I can't sum the new field in a later query without getting the message: "The Microsoft Jet database engine could not execute the SQL statement because it contains a field that has an invalid data type." Is there any way to add (+) 2 fields together, even if one has some null values, and then later sum the new field- using 2.0? Thanks, Todd |
Thread Tools | |
Display Modes | |
|
|