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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Totalling values in a multitude of queries

Status
Not open for further replies.

RAClarke

Instructor
Sep 3, 2001
51
GB
I wonder if someone could kindly assist me with a query I am trying to build. I have a variety of queries that when run produce totals based on tick boxes in a form. My problem is that I want to calculate the overall total of all of these queries added together. I have discovered that if just one of these queries does not contain a value I am unable to produce my overall total figure. What can I do to resolve this problem?
 
Without more info, I would say you need to look at the Nz() function.
Nz([MyField],0)
says if MyField is Null, put a 0 in.
That way, you don't have any blank fields to deal with.

Paul
 
Thanks for this Paul, but where is abouts is the function used and expressed in a query?
 
Put this expression in a new column in your query.
MyNewField:Nz([MyField],0)

You can change the alias, MyNewField to anything you want as long as it's not the field name and you follow it with a colon :

Paul
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top