From: Marshall Barton on 20 Mar 2010 12:38 cinnie wrote: >My report has a column of numbers. Below the column, I would like to show a >text box with the sum of these numbers. In Excel I would just use something >like "= Sum(C3:C56)", but I don't know how to do this in Access. My real >problem is that each report has a different number of rows. Be careful here. The word "field" and the word "control" mean two different things. This is one of those times when the difference between a control bound to a field and a record source field is very important. When using an aggregate function (Count, Sum, etc), you must use FIELDs from the report's record source table/query. You can not use a control on the report. -- Marsh MVP [MS Access]
From: cinnie on 20 Mar 2010 19:39 Yes, that was it! What I had already done was consistent with the good advice from all of the experts that replied. But still nothing worked. You identified the key point - that the numbers being summed were derived from an aggregate function, so the underlying query's field had to be used, not the report's control. Thanks for a great insight. -- cinnie "Marshall Barton" wrote: > cinnie wrote: > > >My report has a column of numbers. Below the column, I would like to show a > >text box with the sum of these numbers. In Excel I would just use something > >like "= Sum(C3:C56)", but I don't know how to do this in Access. My real > >problem is that each report has a different number of rows. > > > Be careful here. The word "field" and the word "control" > mean two different things. This is one of those times when > the difference between a control bound to a field and a > record source field is very important. > > When using an aggregate function (Count, Sum, etc), you must > use FIELDs from the report's record source table/query. You > can not use a control on the report. > > -- > Marsh > MVP [MS Access] > . >
From: Marshall Barton on 21 Mar 2010 09:59 cinnie wrote: >Yes, that was it! What I had already done was consistent with the good >advice from all of the experts that replied. But still nothing worked. You >identified the key point - that the numbers being summed were derived from an >aggregate function, so the underlying query's field had to be used, not the >report's control. Thanks for a great insight. You're welcome, but I see that Duane was making the same point earlier. -- Marsh MVP [MS Access]
First
|
Prev
|
Pages: 1 2 Prev: Drawing a grid on a Report Next: Can I add a map to an Access report? |