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!

Creating a total for a calcualated field

Status
Not open for further replies.

woodyinoz

IS-IT--Management
Jan 8, 2002
215
GB
Hi all,

I have a calculated field within a table on a form which is undefined and is uses a formula to caculate the area of a part.

I then wish to total the column in a field.

Does anyone know how this can be done?

Thanks,

Woody
 
I believe the only way to achieve this is to apply the formula to the table rather than the record. Make summary fields for the fields involved in the calculation outside the tableframe, then give them names(you can hide them if you wish). Place a new calculated field outside the tableframe and stick your formula in it, using the names of the newly created summary fields instead of the actual field names in the tableframe.



Mac :)

"Gurth a choth-en-America! Tôl acharn..."


langley_mckelvy@cd4.co.harris.tx.us
 
Woody,

Alternatively, here's something to try:

1. Copy your current calculation to the clipboard.

2. Drop an unbound field underneath your table frame (or wherever it makes sense).

3. Right-click it, choose Define Field, click the calculated check box, and then past in the calculation.

4. To the left of the calculation, type "sum(" and to the right, add ")" (no quotes, please).

5. Choose OK and then try it out.

Many common calculations can be summarized this way. However, there are a fiew that can't. Instead of going into a lengthy discussion of that, try this and see if it works. If it doesn't, then post your calculation and we'll go from there.

The short answer is that there are times when it's necessary (or desireable) to save calculated field values to a table. Once you've done that, it's easy to summarize them using other calculations.

(FWIW, I'm about half-finished with an article for the site that describes this. Let me know if you need it more quickly.)

Hope this helps...

-- Lance
 
As usual, Lance, your solution is more elegant - lol.

Mac :)

"Gurth a choth-en-America! Tôl acharn..."


langley_mckelvy@cd4.co.harris.tx.us
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top