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!

Sum a static amount? 1

Status
Not open for further replies.

Wease

Technical User
Jul 8, 2001
19
US
In a report I've created a text box with a data source of =200. So for all records the text box will always contain 200 and it's formated as currency. I want to create a text box in the footer that totals all the $200.00 entries? Can someone tell me how to do this? I can't figure how to create a calculation on a text box that doesn't contain a table row as a data source.
 
Hello

Use =Sum (Controlname) in the textbox controlsource to total the results, replacing Controlname with the name of the textbox that holds the price.

John
 
John,

Thanks for the info, but I can't seem to make that work. My first text box has controlsource =200 and a name Family Cost

The text box I'm using to total the family cost has a control source of =Sum ([Family Cost]), but I'm receiving a #error? I've also tried =Sum (Family Cost) but receive the same error????
 
Hello

Change =200 to 200 and this should fix it.
The = sign indicates a formula, which isn't the case here.

John
 
I think you can use
=Sum(200)

in the Report footer and that will do it (assuming you have =200 in the control source for the texbox in your detail section.

Paul
 
I tried both suggestions and I'm still getting an error.

When I change the control source from =200 to just 200, and view the report, Access prompts me with a popup for the value of 200.

If I change the control souce in my total box to =Sum(200), I still get an error??

I've tried a number of different combinations, but to no avail. For something that seems to be simple, I'm really stumped.
 
Add another text box to your detail section with its control source
Code:
=200
, but set its Visible property to No and its RunningSum property to OverAll.

In your report footer, place a text box whose control source is the name of the invisible text box. Something like:
Code:
=[txtRunningSum]


Hoc nomen meum verum non est.
 
I would either add a column to the query:
My200: 200
and then use bound controls and
=Sum([My200])
or just
=Count(*) * 200


Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
Thanks for everyone's help, I really appreciate it. In the end I took Cosmo Kramers suggestion which worked great !!!

I hope everyone has a healthy and happy holiday(s) !!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top