Summing fields for a total

L

larryo

I am a novice struggling to develop an input form for a non-profit. One of
the subforms contains a number of fields related to a client's expenses. I
would like to add them and have the total appear in a text box in that
subform. I have created the text box and entered an expression to add all
those expenses to show a total. It works, but only if I enter numerical
values in every field, or certain of the fields - that's not the way I want
it! I would like to see the total appear, and change, each time I enter a
number in any of the included fields. It just doesn't do it. What am I
doing wrong, or what should I do to make it happen?
 
S

scubadiver

Try

1) putting the total in the footer

2) Putting the sum in the "after update" event of each field so it updates
the total
 
L

larryo

Scubadiver,
Thanks for the comeback, but suggestion 1) didn't work - I got the same
results - even though I put numbers in each of the fields, no total appears
until I place an entry into the last field. As for 2), I didn't understand
what to do. I went to the "Properties" and to the "After Updates" feature in
"Events", but didn't know what to do then. You referred to Sum, but I don't
know what that means. Maybe I'm using the wrong expression. It goes =
[field1]+[field2]+[field3]+ etc, to include all of the 10 fields I am
attempting to add up.
 
S

scubadiver

In the "after update" event of each field put

[total] = [field1]+[field2] ...

etc


larryo said:
Scubadiver,
Thanks for the comeback, but suggestion 1) didn't work - I got the same
results - even though I put numbers in each of the fields, no total appears
until I place an entry into the last field. As for 2), I didn't understand
what to do. I went to the "Properties" and to the "After Updates" feature in
"Events", but didn't know what to do then. You referred to Sum, but I don't
know what that means. Maybe I'm using the wrong expression. It goes =
[field1]+[field2]+[field3]+ etc, to include all of the 10 fields I am
attempting to add up.
--
larryo


scubadiver said:
Try

1) putting the total in the footer

2) Putting the sum in the "after update" event of each field so it updates
the total
 
L

larryo

Scubadiver,
No, it still didn't work. Maybe I should give up! The only way I can get a
total is to enter a figure in every one of the ten fields. Then it works.
Also, even when I do this, I was hoping I would see that calculated total
appear in my related table but it doesn't. Is there some way to make that
happen also? I don't know if I'll ever master this. I am still working on
designing the tables and the input form. I can just imagine how difficult it
will become when I attempt to move on to queries and output reports.
--
larryo


scubadiver said:
In the "after update" event of each field put

[total] = [field1]+[field2] ...

etc


larryo said:
Scubadiver,
Thanks for the comeback, but suggestion 1) didn't work - I got the same
results - even though I put numbers in each of the fields, no total appears
until I place an entry into the last field. As for 2), I didn't understand
what to do. I went to the "Properties" and to the "After Updates" feature in
"Events", but didn't know what to do then. You referred to Sum, but I don't
know what that means. Maybe I'm using the wrong expression. It goes =
[field1]+[field2]+[field3]+ etc, to include all of the 10 fields I am
attempting to add up.
--
larryo


scubadiver said:
Try

1) putting the total in the footer

2) Putting the sum in the "after update" event of each field so it updates
the total

--
"Loose Change 2nd Edition" has been seen by almost 7 million people on
Google video


:

I am a novice struggling to develop an input form for a non-profit. One of
the subforms contains a number of fields related to a client's expenses. I
would like to add them and have the total appear in a text box in that
subform. I have created the text box and entered an expression to add all
those expenses to show a total. It works, but only if I enter numerical
values in every field, or certain of the fields - that's not the way I want
it! I would like to see the total appear, and change, each time I enter a
number in any of the included fields. It just doesn't do it. What am I
doing wrong, or what should I do to make it happen?
 
S

scubadiver

Try defaulting the boxes to zero in the table design then it may work.


Access is a very steep learning curve. It has taken me 18 months to get to a
decent level of competence.

larryo said:
Scubadiver,
No, it still didn't work. Maybe I should give up! The only way I can get a
total is to enter a figure in every one of the ten fields. Then it works.
Also, even when I do this, I was hoping I would see that calculated total
appear in my related table but it doesn't. Is there some way to make that
happen also? I don't know if I'll ever master this. I am still working on
designing the tables and the input form. I can just imagine how difficult it
will become when I attempt to move on to queries and output reports.
--
larryo


scubadiver said:
In the "after update" event of each field put

[total] = [field1]+[field2] ...

etc


larryo said:
Scubadiver,
Thanks for the comeback, but suggestion 1) didn't work - I got the same
results - even though I put numbers in each of the fields, no total appears
until I place an entry into the last field. As for 2), I didn't understand
what to do. I went to the "Properties" and to the "After Updates" feature in
"Events", but didn't know what to do then. You referred to Sum, but I don't
know what that means. Maybe I'm using the wrong expression. It goes =
[field1]+[field2]+[field3]+ etc, to include all of the 10 fields I am
attempting to add up.
--
larryo


:


Try

1) putting the total in the footer

2) Putting the sum in the "after update" event of each field so it updates
the total

--
"Loose Change 2nd Edition" has been seen by almost 7 million people on
Google video


:

I am a novice struggling to develop an input form for a non-profit. One of
the subforms contains a number of fields related to a client's expenses. I
would like to add them and have the total appear in a text box in that
subform. I have created the text box and entered an expression to add all
those expenses to show a total. It works, but only if I enter numerical
values in every field, or certain of the fields - that's not the way I want
it! I would like to see the total appear, and change, each time I enter a
number in any of the included fields. It just doesn't do it. What am I
doing wrong, or what should I do to make it happen?
 
L

larryo

Scubadiver,
I did try setting the default values to 0 but that didn't work. So then I
set the default values to .01, and that did work - not an ideal solution but
at least I can move on - I might even try it using .001, so that it has
almost no significance on the outcome. What about my other question as to
how I can get this total to appear in a table?
--
larryo


scubadiver said:
Try defaulting the boxes to zero in the table design then it may work.


Access is a very steep learning curve. It has taken me 18 months to get to a
decent level of competence.

larryo said:
Scubadiver,
No, it still didn't work. Maybe I should give up! The only way I can get a
total is to enter a figure in every one of the ten fields. Then it works.
Also, even when I do this, I was hoping I would see that calculated total
appear in my related table but it doesn't. Is there some way to make that
happen also? I don't know if I'll ever master this. I am still working on
designing the tables and the input form. I can just imagine how difficult it
will become when I attempt to move on to queries and output reports.
--
larryo


scubadiver said:
In the "after update" event of each field put

[total] = [field1]+[field2] ...

etc


:

Scubadiver,
Thanks for the comeback, but suggestion 1) didn't work - I got the same
results - even though I put numbers in each of the fields, no total appears
until I place an entry into the last field. As for 2), I didn't understand
what to do. I went to the "Properties" and to the "After Updates" feature in
"Events", but didn't know what to do then. You referred to Sum, but I don't
know what that means. Maybe I'm using the wrong expression. It goes =
[field1]+[field2]+[field3]+ etc, to include all of the 10 fields I am
attempting to add up.
--
larryo


:


Try

1) putting the total in the footer

2) Putting the sum in the "after update" event of each field so it updates
the total

--
"Loose Change 2nd Edition" has been seen by almost 7 million people on
Google video


:

I am a novice struggling to develop an input form for a non-profit. One of
the subforms contains a number of fields related to a client's expenses. I
would like to add them and have the total appear in a text box in that
subform. I have created the text box and entered an expression to add all
those expenses to show a total. It works, but only if I enter numerical
values in every field, or certain of the fields - that's not the way I want
it! I would like to see the total appear, and change, each time I enter a
number in any of the included fields. It just doesn't do it. What am I
doing wrong, or what should I do to make it happen?
 
S

scubadiver

That is weird. I have a form for entering employee absence and holiday. It
works okay for me.

The whole point of having the expression in the "after update" event is that
it WILL update and store the total after every time you change the score in
an individual field.

I assume you changed the fields in the expression to what you have in your
table. Also, I assume you have a field in the table for storing the total.

Unless you can be absolutely sure the total will never change, the MVPs on
here will always say (and is common sense) that you should never store totals
in a table. Always use a query.





--
"Loose Change 2nd Edition" has been seen by almost 7 million people on
Google video


larryo said:
Scubadiver,
I did try setting the default values to 0 but that didn't work. So then I
set the default values to .01, and that did work - not an ideal solution but
at least I can move on - I might even try it using .001, so that it has
almost no significance on the outcome. What about my other question as to
how I can get this total to appear in a table?
--
larryo


scubadiver said:
Try defaulting the boxes to zero in the table design then it may work.


Access is a very steep learning curve. It has taken me 18 months to get to a
decent level of competence.

larryo said:
Scubadiver,
No, it still didn't work. Maybe I should give up! The only way I can get a
total is to enter a figure in every one of the ten fields. Then it works.
Also, even when I do this, I was hoping I would see that calculated total
appear in my related table but it doesn't. Is there some way to make that
happen also? I don't know if I'll ever master this. I am still working on
designing the tables and the input form. I can just imagine how difficult it
will become when I attempt to move on to queries and output reports.
--
larryo


:


In the "after update" event of each field put

[total] = [field1]+[field2] ...

etc


:

Scubadiver,
Thanks for the comeback, but suggestion 1) didn't work - I got the same
results - even though I put numbers in each of the fields, no total appears
until I place an entry into the last field. As for 2), I didn't understand
what to do. I went to the "Properties" and to the "After Updates" feature in
"Events", but didn't know what to do then. You referred to Sum, but I don't
know what that means. Maybe I'm using the wrong expression. It goes =
[field1]+[field2]+[field3]+ etc, to include all of the 10 fields I am
attempting to add up.
--
larryo


:


Try

1) putting the total in the footer

2) Putting the sum in the "after update" event of each field so it updates
the total

--
"Loose Change 2nd Edition" has been seen by almost 7 million people on
Google video


:

I am a novice struggling to develop an input form for a non-profit. One of
the subforms contains a number of fields related to a client's expenses. I
would like to add them and have the total appear in a text box in that
subform. I have created the text box and entered an expression to add all
those expenses to show a total. It works, but only if I enter numerical
values in every field, or certain of the fields - that's not the way I want
it! I would like to see the total appear, and change, each time I enter a
number in any of the included fields. It just doesn't do it. What am I
doing wrong, or what should I do to make it happen?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top