# Help! I can't get Access to add!

**URL:** https://boards.straightdope.com/t/help-i-cant-get-access-to-add/131303
**Category:** Factual Questions
**Created:** [October 8, 2002, 2:23am UTC](https://boards.straightdope.com/t/help-i-cant-get-access-to-add/131303 "2002-10-08T02:23:36Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![sethdallob](https://avatars.discourse-cdn.com/v4/letter/s/e36b37/32.png) [@sethdallob](https://boards.straightdope.com/u/sethdallob)
#### Post date: [October 8, 2002, 2:23am UTC](https://boards.straightdope.com/t/help-i-cant-get-access-to-add/131303/1 "2002-10-08T02:23:36Z")

</div>

I’m trying to set up a database to track client payments for tax purposes (instead of using a written out ledger). I have a table and form set up to enter in each type of income (haircuts, color, tips), etc., but I can’t get the damn thing to add horizontally.

For example, I have a query set up that will give me the weeks’ totals for how much I made on haircuts, how much I made on colors, etc. But I can’t get it to add those numbers up to give me a total that I made for the week.

How do I do this? It shouldn’t be that hard…

---

<div class="post-metadata">

### Author: ![jbird3000](https://avatars.discourse-cdn.com/v4/letter/j/aeb1de/32.png) [@jbird3000](https://boards.straightdope.com/u/jbird3000)
#### Post date: [October 8, 2002, 3:16am UTC](https://boards.straightdope.com/t/help-i-cant-get-access-to-add/131303/2 "2002-10-08T03:16:19Z")

</div>

“WeeklyTotal: Sum(Haircuts) + Sum(Color) + Sum(Tips)…”

or

Have in a query "Total: Haircuts + Color + Tips… " and have another query based on that one with “WeeklyTotal: Sum(Total)”  
If any of the columns are null values (no number, not even zero), the addition won’t work. You’ll have to put “Nz(Haircuts, 0)” instead of just “Haircuts” in whichever method you choose.

---

<div class="post-metadata">

### Author: ![sethdallob](https://avatars.discourse-cdn.com/v4/letter/s/e36b37/32.png) [@sethdallob](https://boards.straightdope.com/u/sethdallob)
#### Post date: [October 8, 2002, 3:38am UTC](https://boards.straightdope.com/t/help-i-cant-get-access-to-add/131303/3 "2002-10-08T03:38:15Z")

</div>

> [@](#):
>
> \*Originally posted by jbird3000 \*  
> \*\*Have in a query "Total: Haircuts + Color + Tips… " and have another query based on that one with “WeeklyTotal: Sum(Total)”  
> \*\*

I’m sorry for acting like a complete idiot, but i can’t figure out how to do what you are saying - is there some dialog box that I enter in the stuff in quotes above? In design view, all I can do is sum up one column at a time (all i can do is sum of “Sum Tips”, which does nothing.

---

<div class="post-metadata">

### Author: ![Horseflesh](https://sea3.discourse-cdn.com/straightdope/user_avatar/boards.straightdope.com/horseflesh/32/7502_2.png) [@Horseflesh](https://boards.straightdope.com/u/Horseflesh)
#### Post date: [October 8, 2002, 4:06am UTC](https://boards.straightdope.com/t/help-i-cant-get-access-to-add/131303/4 "2002-10-08T04:06:58Z")

</div>

**jbird** has it right. Look closely at the very first line in his post. Type that in (without the quotes) the top row of a blank column.

The syntax goes like this: _Fieldname_: _formula_

This what’s known in Access as a calculated field. One caveat is I believe you’ll have to enclose the field names used in your formula in square brackets, like thus: **Weekly Total: Sum([Haircuts]) + Sum([Color])** etc. “Weekly Total” is the name assigned to your calculated field.

You can build it if you save the query first with all of the fields that you want to sum already displayed in a column. Then reopen the query, click in the top row of the next blank column and then click on the ellipses (build) button on the right side of the blank box. The build expression dialog will appear and all of the columns you have defined in the query when it was saved will show up in the middle column at the bottom. Simply double-click the first field you want to add, then the “+” button (or type “+”), then double-click the next field, and so on. Once you have your expression built, click OK and it will appear in the once blank column that you started in. You may then delete the other columns if you do not need to see them in your query.

---

<div class="post-metadata">

### Author: ![sethdallob](https://avatars.discourse-cdn.com/v4/letter/s/e36b37/32.png) [@sethdallob](https://boards.straightdope.com/u/sethdallob)
#### Post date: [October 8, 2002, 4:25am UTC](https://boards.straightdope.com/t/help-i-cant-get-access-to-add/131303/5 "2002-10-08T04:25:16Z")

</div>

> [@](#):
>
> \*Originally posted by jbird3000 \*  
> \*\*Have in a query "Total: Haircuts + Color + Tips… " and have another query based on that one with “WeeklyTotal: Sum(Total)”  
> \*\*

I’m sorry for acting like a complete idiot, but i can’t figure out how to do what you are saying - is there some dialog box that I enter in the stuff in quotes above? In design view, all I can do is sum up one column at a time (all i can do is sum of “Sum Tips”, which does nothing.

---

<div class="post-metadata">

### Author: ![sethdallob](https://avatars.discourse-cdn.com/v4/letter/s/e36b37/32.png) [@sethdallob](https://boards.straightdope.com/u/sethdallob)
#### Post date: [October 8, 2002, 4:30am UTC](https://boards.straightdope.com/t/help-i-cant-get-access-to-add/131303/6 "2002-10-08T04:30:40Z")

</div>

whoops delayed double post. sorry.
