Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Add numbers even if field is blank 2

Status
Not open for further replies.

jh3016

Programmer
Jun 6, 2003
148
US
I'm trying to condense a report. I built a report that has different fields that hold dollar amounts. These fields are not in database format because I didn't want to do any relationships. Now I'm running into a problem when I try to add on the form and when I try to build a report.

First part of question for Form:
I have a database that has some fields with zero value. I have to manually put in a zero in each field that is going to be calculated for the total to sum. Is there a way to sum even if there is nothing in the field?

Second part of question for Report:
If there is nothing in the field, how can I tell Access not to include in the report? In other words, I don't want extra lines for fields that have nothing in them.

Help!

Thanks in advance.
 
To total across fields use syntax like:
=Nz(Field1,0) + Nz(Field2,0) + etc....
In a report, you can set the Can Shrink property of the text box to Yes. The text box will shrink vertically as long as there are not any controls left or right of the control and the value of the control is Null.

Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
1.[tab]Nz

2.[tab]CanGrow & CanShrink

3.[tab]{F1} (a.k.a. HELP) re 1 & 2.






MichaelRed
m.red@att.net

Searching for employment in all the wrong places
 
Great, this works just fine!!!

Stars to both!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top