I'm having trouble with a result set that returns null values that I want to convert to a zero numeric value. If memory serves me right, the following function would return a zero if applied to a null value field.
Nz([field1],0)
When I use this in a query, the field returns a 0. But for some reason, when I try to calculate on this field, it seems to treat it like it's a "0" text string . . .
What's happening is I have two tables that I have created a RIGHT JOIN in my query. The result recordset has some null value fields because I want all records to show for one table even though there is no matching record in the other table. I want these null values to return a 0 value, so I can run a report that shows the sum of the two fields for all records.
I know I've used this solution in the past, but I'm thinking there must be something different about the way I'm using the Nz function that is causing the calculation not to work.
Thanks in advance for any help you can give.
Will
"Never laugh at ignorance. You may not know what your laughing at."
Nz([field1],0)
When I use this in a query, the field returns a 0. But for some reason, when I try to calculate on this field, it seems to treat it like it's a "0" text string . . .
What's happening is I have two tables that I have created a RIGHT JOIN in my query. The result recordset has some null value fields because I want all records to show for one table even though there is no matching record in the other table. I want these null values to return a 0 value, so I can run a report that shows the sum of the two fields for all records.
I know I've used this solution in the past, but I'm thinking there must be something different about the way I'm using the Nz function that is causing the calculation not to work.
Thanks in advance for any help you can give.
Will
"Never laugh at ignorance. You may not know what your laughing at."