Display the sum of a column

echorley

Registered User.
Local time
Today, 15:16
Joined
Mar 11, 2003
Messages
131
I am using access for gathering football statistics during a live game. I have a form that will show simple cumulative statistics as the game progresses.

I want a text box to show the sum of rushing yards for eah play. In the controlsource box of the text box properties I used the following expression

= Sum ( [tblOffense]![Rushing Yards] )

that I made in the expressions builder. However, when I input some statistics, I get the "#Error" error in the text box.

Any ideas?
 
Check out the DSum function, or better yet investigate using a totals query as the control source for your text box.
 
Totals Query

Yes I just tried that. I can get the query to show the correct total, but the expression I put in the controlsource box does not display that value.

I have a query named qrySumRushYards

Here is what I put into the controlsource box.

=[qrySumRushYards][SumOfRushing Yards Gained]

Now I get the #Name error!

So my basic question is how to get a text box to show the result of a query without VB code (which I know how to do, but is not practicle with the way I set up the database).
 
No

The form is based on a table. I just cannot seem to get a text box to show the results of this query with out coding it in VB.
 
GOT IT

I used a list box (rather than a text box) and put the query right into the RowSource box. I do have to write some requery code but that is easy!
 

Users who are viewing this thread

Back
Top Bottom