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!

How do I Sum a Field in the Detail Windows?

Status
Not open for further replies.

sandingdude

IS-IT--Management
Jun 26, 2002
109
US
I have this database where I need to do a basic sum of a rebate based on an invoice:

It looks like this:

Invoice Header
INV #1234
Detail
Belt 3" $5.00
Disc 5" $10.00
Invoice Footer
Total Rebate $15.00

I have a footer where i put =SUM([RTOTAL)] and it doesn't do a sum it says my expression is too complicated. Any ideas?

Thanks,

Dave
 
What is the name of the field that holds the rebate amount and is it a calculated field. That is, do you multiply some values time each other to get the values $5.00 and $10.00?

Paul
 
Hi Dave!

I assume that RTotal is the name of the text box that holds the total rebate. Again I am going to assume that RTotal sums the text boxes above it in your post so it's control source is Field1 + Field2 + etc. If all of that is true then what you need to do is to make the control source of the text box in your footer:

Sum(Field1 + field2 + etc)

hth


Jeff Bridgham
bridgham@purdue.edu
 
Thanks guys for the help. The name of the Rebate amount in the detail window is RTOTAL. RTOTAL is an IIf expression in the query the report is based upon. Can I send the database for you guys to take a peak at? My boss keeps asking me to do stuff with it, so it got really confusing.

The RTOTAL is based on if the gross margin of an invoice is greater than or equal to 25, then the rebate status is "pay rebate" if no, the rebate status is "no". RTOTAL says if the rebate status is pay rebate then "part price x .05", if the status is "no rebate" then "$0".

I can send you the database to take a look. All I need is to know how to take the SUM of what I see in the report.

Thanks in advance

Dave
 
Hi Dave!

You can send it to if you like, but you will need to zip it first or our security here will bounce it.

hth


Jeff Bridgham
bridgham@purdue.edu
 
Hi Jeff

Thanks for your help.

I'm sending it right now.

Dave
 
RTOTAL may resolve to text. Is it left or right aligned when viewed in datasheet. If it is left aligned, you may need to use:
=SUM( Val([RTOTAL]) )
Note, your orginal expression had the ] and ) switched.

Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
thanks for the help dhookman

the field is left aligned and i tried your expression and i get the same error, where it tells me my expression is too complicated. i don't understand. everything should work. did you want me to send you the db to look at? i would really appreciate it.

thanks,

dave
 
What is your expression for calculating RTOTAL?

Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
That is not how you are calculating RTOTAL. That is how you hope to sum RTOTAL in your report. You stated earlier " RTOTAL is an IIf expression in the query the report is based upon." I am asking what your calculation/IIf() expression consists of.

Duane
MS Access MVP
Find out how to get great answers faq219-2884.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top