Formulas

  • Thread starter hugz via AccessMonster.com
  • Start date
H

hugz via AccessMonster.com

Hi!

I'm having troubles with my report, it's an income statement. I have the
following fields,whose values are automatically computer via queries: Cash
Sales; Credit Sales; Cost of Sales; Utilities; Salaries; Office Supplies;
Miscellaneous.. I'll have the database compute for Total Income, which is
Cash + Credit Sales. Then I'll also have it compute for Total Expenses which
is Utilities+Salaries+Office Supplies+Miscellaneous.. Then it should also
show the Net Income which is Total Income-Total Expenses..

Now for the problem.. If one of the fields are empty,why can't the database
compute for the values needed to be computed? What should i do so that if a
field is empty, it's value would be equal to 0 (zero)?

Is there any other way that the database can compute for the values needed to
be computed even if some of the fields are empty or do not have any value?

Thanks for those who would help, any help would be greatly appreciated!
 
M

Marshall Barton

hugz said:
I'm having troubles with my report, it's an income statement. I have the
following fields,whose values are automatically computer via queries: Cash
Sales; Credit Sales; Cost of Sales; Utilities; Salaries; Office Supplies;
Miscellaneous.. I'll have the database compute for Total Income, which is
Cash + Credit Sales. Then I'll also have it compute for Total Expenses which
is Utilities+Salaries+Office Supplies+Miscellaneous.. Then it should also
show the Net Income which is Total Income-Total Expenses..

Now for the problem.. If one of the fields are empty,why can't the database
compute for the values needed to be computed? What should i do so that if a
field is empty, it's value would be equal to 0 (zero)?


The Nz function is probably what you are looking for here.
Check VBA Help for details.
 

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