View Full Version : row total


Sudha
05-29-2001, 06:46 AM
Hi,

How do I calculate the sum of certain fields in a row on the form

Sudha

MSUKevin
05-29-2001, 07:00 AM
Create an unbound text box on the form and enter this as the ControlSource:

=Sum([FieldName])

Sudha
05-29-2001, 07:46 AM
I don't that is the one.I want the row total, not column total. Suppose I have fields Name,Jan,Feb upto Dec, and I enter the name and no. of hours worked by a person under these fields, then I want the total no. of hours worked by each person for the year.

Sudha

charityg
05-29-2001, 09:01 AM
=jan+feb+mar+...you get the idea

KevinM
05-29-2001, 09:28 AM
I am assuming (hoping !) that these column names are part of a crosstab query and NOT actual field names from a table.

If so,

Then create a normal Totals query first to get the totals you want and then base your crosstab query on this.
That way the first query does all the calculating and your crosstab query will ALWAYS be up to date.

HTH

Subodh
05-31-2001, 04:58 AM
I dont think its a crosstab iuuue. Better u should try Charityg's solution

KevinM
05-31-2001, 06:04 AM
If it isn't a crosstab issue then the db has been badly designed and should be re-structured.

The last thing you want is a normal table that includes every month of the year as individual fields.