By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,705 Members | 1,795 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,705 IT Pros & Developers. It's quick & easy.

Null Values to zero

P: n/a
Hello,

Please could you help with the following:

I would like to change the null values on a query result and/or table
to zero so I can perform calculations. At the moment, I cannot
calculate against these cells as they have no value.

thx

;)
Nov 12 '05 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Look up the Nz function in help. That should fix it.
David B

Doc Skylab the uber surgeon <ge************@t-mobile.co.uk> wrote in message
news:a5**************************@posting.google.c om...
Hello,

Please could you help with the following:

I would like to change the null values on a query result and/or table
to zero so I can perform calculations. At the moment, I cannot
calculate against these cells as they have no value.

thx

;)


Nov 12 '05 #2

P: n/a
Doc Skylab the uber surgeon wrote:
Please could you help with the following:

I would like to change the null values on a query result and/or table
to zero so I can perform calculations. At the moment, I cannot
calculate against these cells as they have no value.


The Nz() function does exactly that. If its argument is not Null, it
simply returns its argument; if it *is* Null, it either returns the
second parameter if you supply it, or either "" or 0, depending on the
datatype of the recipient in the expression

--
Bas Cost Budde
http://www.heuveltop.org/BasCB
but the domain is nl

Nov 12 '05 #3

P: n/a

Thanks for the last posting, please could you help with where I should
be putting the Nz function, I am lost............................

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 12 '05 #4

P: n/a
In the top line of the query grid, instead of the field name from your table put
Nz([fieldname],0)
Access will put Expr1: or similar in front of Nz. You can replace Expr with
something more meaningful
DB
Geraint Thomas <ge************@t-mobile.co.uk> wrote in message
news:40*********************@news.frii.net...

Thanks for the last posting, please could you help with where I should
be putting the Nz function, I am lost............................

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!


Nov 12 '05 #5

P: n/a
Geraint Thomas wrote:
Thanks for the last posting, please could you help with where I should
be putting the Nz function, I am lost............................


In the first row in the query designer, you usually put field names,
selected from the list, right? But you can enter whatever you want there.

You will enter there

nYourField: Nz(yourfield)

The first word is the column label. If you omit it, Access fills in
'Expr1', 'Expr2' and so on for every next expression
The colon indicates that the first word is indeed a label.
Nz is the name of the function
The parentheses indicate a function, and keep all arguments to the
function together.
Finally, the word within the parentheses is your only parameter, the
original field name. This one must exist; you replace it with the actual
field name.

--
Bas Cost Budde
http://www.heuveltop.org/BasCB
but the domain is nl

Nov 12 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.