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

Suming Calculated field 1

Status
Not open for further replies.

ncopeland

IS-IT--Management
Mar 12, 2002
88
GB
Hi

Very quick one. I have a text box in the detail section of a report. This field is a calculation. The field is called Value.

I want to sum this field in the group footer.

Is this possible and if so how.

Kind Regards


NC
 
It should be possible. Just put in the formula to =sum(NameOfCalcField). It has been a while since I have done that, but I believe that is correct.
 
NC,
I am confused by your use of text box and field. A field is a column in a table or query. A text box is a control on a form or report.

You can't sum a control from one section of a report to another. For instance if you have a text box in the detail section of your report:
Name: txtTotalCost
Control Source: =[Qty] * [Price]
You can't add a text box in any header or footer with a control source of:
=Sum(txtTotalCost)
You can set the control source to:
=Sum([Qty] * [Price])

BTW: [blue]Value[/blue] is not a good name for either a field or a control. [blue]Value[/blue] is a property of most bound controls and other objects.


Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Hi

How do you create a total field for the following scenario. I am creating a costing sheet based on qty_sold * unit_cost giving value. If none are sold then the value will be 0. I thought about suming the unit costs and on the total line multiplying them by the quantity sold. This only works if all line items have a sold quantity beside them.

Any suggestions.

KR.

NC.
 
I'm not sure what would be wrong if you used:
=Sum(qty_sold * unit_cost)


Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Hi

Still not sure. I have a report that is grouped by customer. I have a number of detail lines per customer. I have a text box in the detail line that is

=[unitCost] * [SoldQty]

This gives me the correct total in the detail line. In the footer for each customer I want to get a total value for all the detail lines.

KR

NC.
 
Did you try my suggestion? Did it work? If not, why not?

Did you really want the total for all detail lines or just for the one customer group?

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Hi Dhookom

example report

wo part qty unit value

Customer header

1 1234 10 1.50 15.00
2 3456 50 1.00 50.00

Footer

60 65.00


I want get values for detail ie wo 1,2 which I can get to work.

But as can be seen I also want a value in each customer footer for the total value sold. Not quite sure how to construct.

KR

NC.
 
Isn't the [blue]65.00[/blue] value what you want to display in the customer footer? Is your [blue]Footer[/blue] the customer footer or another footer?

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Hi

Yes I want to display the 65.00 in the customer footer.

KR

NC.
 
Did you try display the customer footer and add a text box with a control source of:
=Sum([unitCost] * [SoldQty])

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Thanks dhookom

Me being stupid.

All sorted.

KR

NC.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top