Solved

# Access Tabular Form - Sum Rows

Posted on 2007-08-09
1,798 Views
I'm trying to sum the rows on my tabular form but =Sum([1]+[2]+[3]) doesn't work. It's easy enough to sum columns but I could do with help with rows.

Thanks.
0

LVL 75

Expert Comment

Where do you have that expression?

mx
0

Author Comment

In a text box which is on the same row as I'm trying to sum.
0

LVL 75

Expert Comment

If ... in a Control Source of a text box, the general syntax is:

=Sum([Field1]+[Field2]+ .....)

where Field 1/2 are fields in the record source of the form, not the name of text boxes.

mx
0

Author Comment

I'm using the same syntax, the issue is that I'm summing a row of a 'tabular' form. Thanks.
0

LVL 119

Expert Comment

use nz to handle nulls

=sum(nz([Field1]) +nz([Field2]) + nz([Field3]))
0

LVL 75

Accepted Solution

ok .... try

=([Field1]+[Field2]+ .....)

w/o out the Sum ... just use the plus sign.

mx
0

LVL 75

Expert Comment

The key is .... across the Row, right?

either =([Field1]+[Field2]+ .....)

or

=([textbox1]+[textbox2]+ .....)

mx
0

LVL 119

Assisted Solution

or you can use a query as record source of your tabular form,
include the totals in the query

select field1,field2,field3, nz([Field1]) +nz([Field2]) + nz([Field3]) as [Total]
from tableName
0

## Featured Post

When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
This isn't a frequent question on EE. I must have seen it three or four times (among several thousand questions). However, I use this trick quite often, most frequently as a delayed Current event. A form does not expose it's calculation dependenc…
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.