Calculated Fields

K

Karen Howard

Hi!

I have a table that I'm designing my query from to
calculate the number of hours worked in a day from the
table.

My query is:

Total:[Monday]+[Tuesday], etc.

The problem is that it worked fine until I added Saturday
and Sunday to the query. Now the values don't calculate
for any of the fields.

All I did to the table was "copied" 1 existing Number
field (Set at a Field Size of double; Decimal: Auto) and
changed the title.

What is going on with the calculation??? Please help.
Thanks!
 
R

Rick Brandt

Karen Howard said:
Hi!

I have a table that I'm designing my query from to
calculate the number of hours worked in a day from the
table.

My query is:

Total:[Monday]+[Tuesday], etc.

The problem is that it worked fine until I added Saturday
and Sunday to the query. Now the values don't calculate
for any of the fields.

If any of the fields in an expression like this contains a Null, then the entire
expression will evaluate to Null. You can use Nz() function to treat Nulls the same
as zeros.

Total: Nz([Monday],0) + Nz([Tuesday],0) etc..
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top