RE: Totals Row Not Summing
- From: Matthew Pfluger <MatthewPfluger@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 22 Aug 2008 09:04:02 -0700
It is not a calculated coltrol that is showing the sum, it is the data***'s
summary row. You know, you click the "Totals" switch on the Ribbon, and the
summary ro appears at the bottom of the data***. I try to set the summary
to SUM, but it doesn't calculate a sum. There are no blanks in the column.
Also, I tried wrapping the function in the source query with a
CLng(Nz([field],0)), but that also did not make the SUM function work.
Any suggestions? I'm out of ideas. The summary row works in the source
query, so I'm not sure why it fails in the subform.
Thanks,
Matthew Pfluger
"Klatuu" wrote:
Is the calculated control that should show the sum on the subform's footer?.
Let's say your subform text box control is txtCost and it's ControlSource is
[ItemCost]
In the subform's footer say you have a textbox named txtTotCost. It's
Control Source should be:
=Sum([ItemCost])
Now, on your main form, you will need a control to display the value because
the control on the subform footer in data*** view will not be visible. Its
control source should be:
=SubformControlName.Form.txtTotCost
--
Dave Hargis, Microsoft Access MVP
"Matthew Pfluger" wrote:
My database contains several parent-child relationships. On the main form, I
display two subforms: one of a data*** of parents and their total hours and
costs, and one of the children of the selected parent and its total hours and
cost. I enabled the totals row on the two data*** subforms, but the totals
row doesn't display the SUM of the column. The source for the subforms are
two queries that contain Nz() functions to fill in blank cells with 0's.
I tried setting the total row to other functions like COUNT and VARIANCE,
and every other function works. Why would every other function work but not
SUM?
Thanks,
Matthew Pfluger
- Follow-Ups:
- RE: Totals Row Not Summing
- From: Klatuu
- RE: Totals Row Not Summing
- References:
- RE: Totals Row Not Summing
- From: Klatuu
- RE: Totals Row Not Summing
- Prev by Date: Message Buttons
- Next by Date: RE: Totals Row Not Summing
- Previous by thread: RE: Totals Row Not Summing
- Next by thread: RE: Totals Row Not Summing
- Index(es):