473,378 Members | 1,555 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Null Values to zero

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
5 6465
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
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

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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Lyn | last post by:
I am trying to get my head around the concept of default, special or empty values that appear in Access VBA, depending on data type. The Access Help is not much (help), and the manual that I have...
12
by: jkearns | last post by:
Hello, I made a report from a crosstab query following the steps onlined in MSDN's Solutions.mdb example. I now have a dynamic crosstab report (great!), but with one minor problem. I cannot get...
8
by: sugaray | last post by:
Hi, I just came upon this code snippet which parses a string stored in buf with comma(,) as delimiter and store each substring into args, the question I'm having here is that I don't get why in the...
102
by: junky_fellow | last post by:
Can 0x0 be a valid virtual address in the address space of an application ? If it is valid, then the location pointed by a NULL pointer is also valid and application should not receive "SIGSEGV"...
25
by: pm940 | last post by:
Hello. I've been reading some past discussions on the NULL vs. zero. References are always made to systems or machienes that use values other than zero to represent the NULL pointer. Although...
4
by: GazK | last post by:
I have a script which takes the results of a form and updates or creates a record in a db table. So far so dull. It works fine, except when I leave certain fields blank; these are entered in the...
64
by: yossi.kreinin | last post by:
Hi! There is a system where 0x0 is a valid address, but 0xffffffff isn't. How can null pointers be treated by a compiler (besides the typical "solution" of still using 0x0 for "null")? -...
17
by: Mark A | last post by:
DB2 8.2 for Linux, FP 10 (also performs the same on DB2 8.2 for Windoes, FP 11). Using the SAMPLE database, tables EMP and EMLOYEE. In the followng stored procedure, 2 NULL columns (COMM) are...
3
ADezii
by: ADezii | last post by:
Null as it relates to database development is one of life's little mysteries and a topic of total confusion for novices who venture out into the database world. A Null Value is not zero (0), a zero...
17
by: copx | last post by:
I don't know what to think of the following.. (from the dietlibc FAQ) Q: I see lots of uninitialized variables, like "static int foo;". What gives? A: "static" global variables are initialized...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.