Nz/Null in MakeTable Qry

M

Maxwell

I need help...Please read carefully

Made a MakeTablew qry on sales by day in a week.
Out of the 7 days, some cells return a Null cell since
there were no sales for that day.

1.) I need to force a Zero on it as an actual value for
calcualtion purposes.
2.) I DON'T want to create another query based off of the
Table I made to force a Zero in the Null cells.
3.) How do I take the fields in the MakeTable qry and
force the OUTPUT to show zeros. Where do i make the
changes in if there needs to be? (Format? Criteria line?)
4.) Is it a format thing? I trie 0;;;0 and it shows on
screen but when I OUTPUT it to a table, it is null again.

Basically I dont want to make another QRY to reformat a
null cell to a zero. Want to do it in one step(in the
MakeTable Qry).

Any help?
 
G

Guest

i am not sure you can force a zero into the field if there
is no value.
but you can force access to treat null fields as if they
did have a zero when it does calculations by useing Nz
the calculation would look something like this
Nz([field1])+Nz([field2])
 
T

tina

first, let's call them fields, not cells ("cell" is an Excel term, very
different from an Access field). in the make-table query design view, in the
Field: row of the QBE grid, replace the field name or expression you are
using with the following:

Nz(FieldName Or Expression, 0)

the Nz() function says "if the value from the field or expression is null,
substitute a zero; otherwise, use the value." replace the
fieldname/expression with above, in each column of the QBE grid where you
need a null to zero replacement.

hth
 
V

Van T. Dinh

You need to tell us the Structure of your Table Sales first. We don't
whether your Table Sales is a "summary" Table or it has a Record for each
sale transaction.
 

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

Similar Threads


Top