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

How calculate subtotal/grandtotal 2

Status
Not open for further replies.

thirty4d

MIS
Feb 1, 2001
61
0
0
US
Hello I have a report based on a query via report wizard.

My report is grouped by Vendor Code.

I want to display a Subtotal for Extended Old Price, Extended New Price, Variance and % Variance at the bottom of each Vendor and I also need to display the Grand Total for each category.

I had no problem calculating the sum of Extended Old Price and sum of Extended New Price.

But when I included in my summing, the Variance and % Variance I get the error "OVERFLOW".

Do I create an unbound textboxes for the Variance and % Variance and where do I pull the data from? underlying query or controls from the report?

Any suggestions would be appreciated.





 
I'm not sure, but maybe you'll need to create a second query that calls the first query.
Johnstown, OH
 
If these fields exist in your query, you create unbound text fields in your report. In the properties window you rename them "txtVariance" and "txtPctVariance" or something meaningful to you. In control source type: =sum(variance) or whatever the variance and %variance fields are named in your underlying query. You should also set the format to the display type you want and set the number of decimal places to display as many places as you want. Maybe the reason you are getting the overflow error message is that the number was carried out too many decimal places and the result was larger than the field size. If you are calculating the variance and %variance in your report, a simple sum statement may not work. At that point, you can either modify your query to include those fields, or if that is not possible, maybe someone else has a suggestion.
Hope this helps.
Gladys

Gladys Clemmer
gladys.clemmer@fifsg.com

 
The overflow error occour when access is trying to perform a calcuation outside of the variable range. Look through each of your queries and search for the word #error, in any of the fields, you will probably find that their is a calculaton being performed that access doesn't like. /0 for example.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top