-----Original Message-----
I'm using Office XP, and in an Access report I have a list of items,
that have retail prices. I want to put a sum for the entire report
of the total prices of the items.
The field is named 'Retail Price'.
The code I've used in the control source field is
=Sum([Retail Price])
but this keeps giving me an error.
Any help would be appreciated.
Check the following points:
(1) The summing text box must be in a group or report footer or header
section. Usually it will be in a footer section. Don't put it in a
page footer or header.
(2) The name of the summing text box must not be the same as the name of
a field in the report's recordsource. So if your text box is summing
the [Retail Price] field, as with the controlsource you posted, name it
something like "txtTotalRetail".
(3) The argument of the Sum() function must be a field or an expression
of fields in the report's recordsource; it can't be the name of an
unbound or calculated control. If you have a calculated control, for
example if [Retail Price] is a text box with controlsource
"=[WholesalePrice]+[Markup]", where [WholesalePrice] and [Markup] are
fields in the recordsource, then you must repeat the calculation in the
argument to the Sum() function, as with this controlsource:
"=Sum(WholesalePrice]+[Markup])".
--
Dirk Goldgar, MS Access MVP
www.datagnostics.com
(please reply to the newsgroup)
.