how do I create a sum of fields returned in a query?

R

rockyd7

I am running a query and looking to create a total of all the items in one
particular field. I want a seperate column on my report to show the total in
addition to each individual item that is a part of the total. Any ideas?
Also, can a query be set to only show items from one particular calendar
month as opposed to a 30 day period?

Thanks for all your help! :)

Rocky
 
J

Jeff Boyce

Rocky

In your query, create a new field, something like:

NewFieldName: Nz([YourFirstField],0) + Nz([YourSecondField],0) + ...

Use the Nz() function in case any of your fields hold a null.

A query can display what you select. If you have a date field in your
underlying table, you could select all the records from, say, March by using
another new field like:
MonthSelected: Month([YourDateField])
and a criterion of:
3
(March, month #3).

Good luck

Jeff Boyce
<Access MVP>
 
R

rockyd7

Forgive me, I am much more of a novice than I think you realize. So far, I
have no idea How to create a new field in a query. The book says to do it,
but does not say how to do so. I'm afraid I'm lost on both aspects of your
answer. I'm not sure what you mean as to how to run the calendar month
either.

Rocky

Jeff Boyce said:
Rocky

In your query, create a new field, something like:

NewFieldName: Nz([YourFirstField],0) + Nz([YourSecondField],0) + ...

Use the Nz() function in case any of your fields hold a null.

A query can display what you select. If you have a date field in your
underlying table, you could select all the records from, say, March by using
another new field like:
MonthSelected: Month([YourDateField])
and a criterion of:
3
(March, month #3).

Good luck

Jeff Boyce
<Access MVP>

rockyd7 said:
I am running a query and looking to create a total of all the items in one
particular field. I want a seperate column on my report to show the total in
addition to each individual item that is a part of the total. Any ideas?
Also, can a query be set to only show items from one particular calendar
month as opposed to a 30 day period?

Thanks for all your help! :)

Rocky
 
J

Jeff Boyce

Rocky

What have you already tried to do?

Can you add a field (from a table) to a query?

In the field row of a query, in an empty "cell", type in what my previous
response indiciated.

In another (empty) field, type in the second -- this will calculate the
month of your date field (substitute the field from your table that holds
the date you wish to select by).

In the row entitled "Criterion", in the "cell" beneath the second, type 3 --
this should return rows in you query that have "3" as the month portion of
the date field.

Good luck.

Jeff Boyce
<Access MVP>

Forgive me, I am much more of a novice than I think you realize. So far, I
have no idea How to create a new field in a query. The book says to do it,
but does not say how to do so. I'm afraid I'm lost on both aspects of your
answer. I'm not sure what you mean as to how to run the calendar month
either.

Rocky

Jeff Boyce said:
Rocky

In your query, create a new field, something like:

NewFieldName: Nz([YourFirstField],0) + Nz([YourSecondField],0) + ...

Use the Nz() function in case any of your fields hold a null.

A query can display what you select. If you have a date field in your
underlying table, you could select all the records from, say, March by using
another new field like:
MonthSelected: Month([YourDateField])
and a criterion of:
3
(March, month #3).

Good luck

Jeff Boyce
<Access MVP>

rockyd7 said:
I am running a query and looking to create a total of all the items in one
particular field. I want a seperate column on my report to show the
total
in
addition to each individual item that is a part of the total. Any ideas?
Also, can a query be set to only show items from one particular calendar
month as opposed to a 30 day period?

Thanks for all your help! :)

Rocky
 
R

rockyd7

Your response leads me to believe that it wants to combine two seperate
fields. I simply want a grand total of all the values listed in all the
records for one particular field. Is there a simple way? BTW, I did what
you said in your reply and it did not work. Thanks for being patient with
me. I really do appreciate your time.

Rocky

Jeff Boyce said:
Rocky

What have you already tried to do?

Can you add a field (from a table) to a query?

In the field row of a query, in an empty "cell", type in what my previous
response indiciated.

In another (empty) field, type in the second -- this will calculate the
month of your date field (substitute the field from your table that holds
the date you wish to select by).

In the row entitled "Criterion", in the "cell" beneath the second, type 3 --
this should return rows in you query that have "3" as the month portion of
the date field.

Good luck.

Jeff Boyce
<Access MVP>

Forgive me, I am much more of a novice than I think you realize. So far, I
have no idea How to create a new field in a query. The book says to do it,
but does not say how to do so. I'm afraid I'm lost on both aspects of your
answer. I'm not sure what you mean as to how to run the calendar month
either.

Rocky

Jeff Boyce said:
Rocky

In your query, create a new field, something like:

NewFieldName: Nz([YourFirstField],0) + Nz([YourSecondField],0) + ...

Use the Nz() function in case any of your fields hold a null.

A query can display what you select. If you have a date field in your
underlying table, you could select all the records from, say, March by using
another new field like:
MonthSelected: Month([YourDateField])
and a criterion of:
3
(March, month #3).

Good luck

Jeff Boyce
<Access MVP>

I am running a query and looking to create a total of all the items in one
particular field. I want a seperate column on my report to show the total
in
addition to each individual item that is a part of the total. Any ideas?
Also, can a query be set to only show items from one particular calendar
month as opposed to a 30 day period?

Thanks for all your help! :)

Rocky
 
J

Jeff Boyce

Rocky

Consider reading Access HELP on "Totals" queries.

Jeff Boyce
<Access MVP>

rockyd7 said:
Your response leads me to believe that it wants to combine two seperate
fields. I simply want a grand total of all the values listed in all the
records for one particular field. Is there a simple way? BTW, I did what
you said in your reply and it did not work. Thanks for being patient with
me. I really do appreciate your time.

Rocky

Jeff Boyce said:
Rocky

What have you already tried to do?

Can you add a field (from a table) to a query?

In the field row of a query, in an empty "cell", type in what my previous
response indiciated.

In another (empty) field, type in the second -- this will calculate the
month of your date field (substitute the field from your table that holds
the date you wish to select by).

In the row entitled "Criterion", in the "cell" beneath the second, type 3 --
this should return rows in you query that have "3" as the month portion of
the date field.

Good luck.

Jeff Boyce
<Access MVP>

Forgive me, I am much more of a novice than I think you realize. So
far,
I
have no idea How to create a new field in a query. The book says to
do
it,
but does not say how to do so. I'm afraid I'm lost on both aspects of your
answer. I'm not sure what you mean as to how to run the calendar month
either.

Rocky

:

Rocky

In your query, create a new field, something like:

NewFieldName: Nz([YourFirstField],0) + Nz([YourSecondField],0) + ....

Use the Nz() function in case any of your fields hold a null.

A query can display what you select. If you have a date field in your
underlying table, you could select all the records from, say, March
by
using
another new field like:
MonthSelected: Month([YourDateField])
and a criterion of:
3
(March, month #3).

Good luck

Jeff Boyce
<Access MVP>

I am running a query and looking to create a total of all the
items in
one
particular field. I want a seperate column on my report to show
the
total
in
addition to each individual item that is a part of the total. Any ideas?
Also, can a query be set to only show items from one particular calendar
month as opposed to a 30 day period?

Thanks for all your help! :)

Rocky
 
R

rockyd7

Jeff, I think you are getting me much closer. The field I have in question
is CheckDue I want to take everything in that comes up from that one field
and create a running total in a seperate field.

For instance:

Check Due Total

1200 1200
1800 3000
2400 5400

or even

Check Due Total
1200
1800
2400
5400

Can you tell me what that would look like? I appreciate it!

Jeff Boyce said:
Rocky

Consider reading Access HELP on "Totals" queries.

Jeff Boyce
<Access MVP>

rockyd7 said:
Your response leads me to believe that it wants to combine two seperate
fields. I simply want a grand total of all the values listed in all the
records for one particular field. Is there a simple way? BTW, I did what
you said in your reply and it did not work. Thanks for being patient with
me. I really do appreciate your time.

Rocky

Jeff Boyce said:
Rocky

What have you already tried to do?

Can you add a field (from a table) to a query?

In the field row of a query, in an empty "cell", type in what my previous
response indiciated.

In another (empty) field, type in the second -- this will calculate the
month of your date field (substitute the field from your table that holds
the date you wish to select by).

In the row entitled "Criterion", in the "cell" beneath the second, type 3 --
this should return rows in you query that have "3" as the month portion of
the date field.

Good luck.

Jeff Boyce
<Access MVP>

Forgive me, I am much more of a novice than I think you realize. So far,
I
have no idea How to create a new field in a query. The book says to do
it,
but does not say how to do so. I'm afraid I'm lost on both aspects of
your
answer. I'm not sure what you mean as to how to run the calendar month
either.

Rocky

:

Rocky

In your query, create a new field, something like:

NewFieldName: Nz([YourFirstField],0) + Nz([YourSecondField],0) + ....

Use the Nz() function in case any of your fields hold a null.

A query can display what you select. If you have a date field in your
underlying table, you could select all the records from, say, March by
using
another new field like:
MonthSelected: Month([YourDateField])
and a criterion of:
3
(March, month #3).

Good luck

Jeff Boyce
<Access MVP>

I am running a query and looking to create a total of all the items in
one
particular field. I want a seperate column on my report to show the
total
in
addition to each individual item that is a part of the total. Any
ideas?
Also, can a query be set to only show items from one particular
calendar
month as opposed to a 30 day period?

Thanks for all your help! :)

Rocky
 
J

Jeff Boyce

Rocky

Check Access HELP on "running sum" -- this is a property of a control you
would place in a report.

Good luck

Jeff Boyce
<Access MVP>

rockyd7 said:
Jeff, I think you are getting me much closer. The field I have in question
is CheckDue I want to take everything in that comes up from that one field
and create a running total in a seperate field.

For instance:

Check Due Total

1200 1200
1800 3000
2400 5400

or even

Check Due Total
1200
1800
2400
5400

Can you tell me what that would look like? I appreciate it!

Jeff Boyce said:
Rocky

Consider reading Access HELP on "Totals" queries.

Jeff Boyce
<Access MVP>

rockyd7 said:
Your response leads me to believe that it wants to combine two seperate
fields. I simply want a grand total of all the values listed in all the
records for one particular field. Is there a simple way? BTW, I did what
you said in your reply and it did not work. Thanks for being patient with
me. I really do appreciate your time.

Rocky

:

Rocky

What have you already tried to do?

Can you add a field (from a table) to a query?

In the field row of a query, in an empty "cell", type in what my previous
response indiciated.

In another (empty) field, type in the second -- this will calculate the
month of your date field (substitute the field from your table that holds
the date you wish to select by).

In the row entitled "Criterion", in the "cell" beneath the second,
type
3 --
this should return rows in you query that have "3" as the month
portion
of
the date field.

Good luck.

Jeff Boyce
<Access MVP>

Forgive me, I am much more of a novice than I think you realize.
So
far,
I
have no idea How to create a new field in a query. The book says
to
do
it,
but does not say how to do so. I'm afraid I'm lost on both aspects of
your
answer. I'm not sure what you mean as to how to run the calendar month
either.

Rocky

:

Rocky

In your query, create a new field, something like:

NewFieldName: Nz([YourFirstField],0) +
Nz([YourSecondField],0) +
....
Use the Nz() function in case any of your fields hold a null.

A query can display what you select. If you have a date field
in
your
underlying table, you could select all the records from, say,
March
by
using
another new field like:
MonthSelected: Month([YourDateField])
and a criterion of:
3
(March, month #3).

Good luck

Jeff Boyce
<Access MVP>

I am running a query and looking to create a total of all the items in
one
particular field. I want a seperate column on my report to
show
the
total
in
addition to each individual item that is a part of the total. Any
ideas?
Also, can a query be set to only show items from one particular
calendar
month as opposed to a 30 day period?

Thanks for all your help! :)

Rocky
 
Top