I don't think you want to Sum a Sum. Since you have an un-normalized table
structure, you should be able to use the following in your subreport footer:
=Sum([A/R])-Sum([Cost Of Goods] + [A/P] + [Labor To Prep] + ...)
If any of these might be null, you need to use Nz() to convert the nulls to 0.
--
Duane Hookom
Microsoft Access MVP
:
Duane,
I've done a lot of reading since I posted my initial question and have
learned that Access can't sum a sum (much unlike Excel...I'm very good with
Excel).
OK, here it goes:
I have tables for the following: Project Cost Main, Project Cost Detail,
Backbilled Invoices, and Sales Expenses. My main report is based on the
Project Cost Main table (holds customer name, machine type purchased, serial
number, salesperson). I have that information at the top of each page for
each individual project. Below that is a subreport based on the Project Cost
Detail table. It shows the following information: item (the machine sold,
any accessories, etc.), A/R, Cost of Goods, A/P, Labor to prep machine for
shipment, Installation and Warranty costs, and Commissions paid to the
salesperson. What I'm trying to do with this particular subreport is sum the
following: A/R, Cost of Goods, A/P, Labor, Installation, Warranty, and
Commission, and then get the Profit / Loss (sum(A/R) - sum(everything else)).
My calculations for the summations of A/R, COGS, A/P, Labor, etc. are
working perfectly. I have the formulas in the report footer for THAT
subreport. However, what i CANNOT get is the P/L calculation.
Like I stated, I've learned that Access can't sum a sum. If that is the
case, what are my options? I don't understand VBA too well, so the more
simple, the better.
:
"something like this..." doesn't provide all the information required.
Did you put this in a text box in a group or report footer section? Did you
include "="? Did you place []s around your field names that contain symbols
and/or spaces?
--
Duane Hookom
Microsoft Access MVP
:
I have one main report with 3 subreports. The 2nd two are working just fine,
doing what I want them to do. The 1st is my problem. I have 5 columns on
the report (A/R, COGS, A/P, Labor, Installation, Warranty, Commission). They
are totaling in the Report Footer like they should (I've done the
calculations myself - they're coming out right). I'd like to show the Profit
/ Loss for each project (one report page per project). The formula I've
tried is something like this...
sum(A/R) - sum(COGS) - sum (A/P) - sum(Labor)...etc.
Why isn't this working?!?!?!!!!
Thanks!
Heather