A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Continuous Forms - Sum of Values



 
 
Thread Tools Display Modes
  #1  
Old July 11th, 2008, 03:01 PM posted to microsoft.public.access.forms
Alan
external usenet poster
 
Posts: 459
Default Continuous Forms - Sum of Values

I have a continuous sub form that uses a query that totals various aspects of
the business against departments.

I can present each field(cloumn) individually no problems and it displays as
expected.What I would like to do is sum accross columns from the ControlSource
Thus I would like a Textbox in my form to display the Sumof Column A, Column
B and Column C

I have tried seting the control source to =SUM(ColumnA+ColumnB+ColumnC)
which produces an error condition.

Any thoughts would be greatfully appreciated


--
Many Thanks

Alan
  #2  
Old July 11th, 2008, 03:20 PM posted to microsoft.public.access.forms
Al Campagna[_2_]
external usenet poster
 
Posts: 1,462
Default Continuous Forms - Sum of Values

Alan,
You shouldn't be summing the column name, you should be summing the
field in that column.
Given an example like an inventory balance with these 3 example
fields...

PartNo Received Disbursed
123 10
123 5
123 7
123 4

The Received sum would be...
=Sum(Received)
The Disbursed sum would be...
=Sum(Disbursed)
The Balance would be...
=Sum(Received) - Sum(Disbursed)
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."


"Alan" wrote in message
...
I have a continuous sub form that uses a query that totals various aspects
of
the business against departments.

I can present each field(cloumn) individually no problems and it displays
as
expected.What I would like to do is sum accross columns from the
ControlSource
Thus I would like a Textbox in my form to display the Sumof Column A,
Column
B and Column C

I have tried seting the control source to =SUM(ColumnA+ColumnB+ColumnC)
which produces an error condition.

Any thoughts would be greatfully appreciated


--
Many Thanks

Alan



  #3  
Old July 11th, 2008, 03:41 PM posted to microsoft.public.access.forms
Alan
external usenet poster
 
Posts: 459
Default Continuous Forms - Sum of Values

Al

Thanks for the reply. I have tried this, however simply get the #error
returned
I have my dept sale grouped into five depts and on a continuous form thus
is displayed on the main form as
Department Name SalesA SalesB SalesC
Dept1 5 2 4
Dept1 3 4 7
Dept3 1 6 2

Another column in the controlsource is sales D and I would like to display
as above but with sales C being a result of the addition of salesC+ SalesD ??

I hope that makes sense as that does not work for me
Do you have any other suggestions ??

--
Many Thanks

Alan


"Al Campagna" wrote:

Alan,
You shouldn't be summing the column name, you should be summing the
field in that column.
Given an example like an inventory balance with these 3 example
fields...

PartNo Received Disbursed
123 10
123 5
123 7
123 4

The Received sum would be...
=Sum(Received)
The Disbursed sum would be...
=Sum(Disbursed)
The Balance would be...
=Sum(Received) - Sum(Disbursed)
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."


"Alan" wrote in message
...
I have a continuous sub form that uses a query that totals various aspects
of
the business against departments.

I can present each field(cloumn) individually no problems and it displays
as
expected.What I would like to do is sum accross columns from the
ControlSource
Thus I would like a Textbox in my form to display the Sumof Column A,
Column
B and Column C

I have tried seting the control source to =SUM(ColumnA+ColumnB+ColumnC)
which produces an error condition.

Any thoughts would be greatfully appreciated


--
Many Thanks

Alan




  #4  
Old July 11th, 2008, 03:53 PM posted to microsoft.public.access.forms
Ryan
external usenet poster
 
Posts: 551
Default Continuous Forms - Sum of Values

In the query that the continuous form is based on, add another field and do
the calcuation there. It would look like this..

Total: SalesC + SalesD

Then just add the field to your continous form. That is the correct way to
add from left to right. If you wanted to total all of SalesA, in your
continuous forms footer, you would put an unbound field, then add this to the
defualt value of that field.

=Sum([SalesA])

This is the correct way to add the values in your columns.
--
Please remember to mark this post as answered if this solves your problem.


"Alan" wrote:

Al

Thanks for the reply. I have tried this, however simply get the #error
returned
I have my dept sale grouped into five depts and on a continuous form thus
is displayed on the main form as
Department Name SalesA SalesB SalesC
Dept1 5 2 4
Dept1 3 4 7
Dept3 1 6 2

Another column in the controlsource is sales D and I would like to display
as above but with sales C being a result of the addition of salesC+ SalesD ??

I hope that makes sense as that does not work for me
Do you have any other suggestions ??

--
Many Thanks

Alan


"Al Campagna" wrote:

Alan,
You shouldn't be summing the column name, you should be summing the
field in that column.
Given an example like an inventory balance with these 3 example
fields...

PartNo Received Disbursed
123 10
123 5
123 7
123 4

The Received sum would be...
=Sum(Received)
The Disbursed sum would be...
=Sum(Disbursed)
The Balance would be...
=Sum(Received) - Sum(Disbursed)
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."


"Alan" wrote in message
...
I have a continuous sub form that uses a query that totals various aspects
of
the business against departments.

I can present each field(cloumn) individually no problems and it displays
as
expected.What I would like to do is sum accross columns from the
ControlSource
Thus I would like a Textbox in my form to display the Sumof Column A,
Column
B and Column C

I have tried seting the control source to =SUM(ColumnA+ColumnB+ColumnC)
which produces an error condition.

Any thoughts would be greatfully appreciated


--
Many Thanks

Alan




  #5  
Old July 11th, 2008, 04:53 PM posted to microsoft.public.access.forms
Al Campagna[_2_]
external usenet poster
 
Posts: 1,462
Default Continuous Forms - Sum of Values

Alan,
Giving us examples helps a lot. But, if you have trouble with your
code, please include that in your post. (Cut & Paste exactly)

For example, what is the Name of the field that sums SalesA, and what is
the ControlSource.

Are SalesA, B, and C calculated fields on your form?
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."


"Alan" wrote in message
...
Al

Thanks for the reply. I have tried this, however simply get the #error
returned
I have my dept sale grouped into five depts and on a continuous form thus
is displayed on the main form as
Department Name SalesA SalesB SalesC
Dept1 5 2 4
Dept1 3 4 7
Dept3 1 6 2

Another column in the controlsource is sales D and I would like to display
as above but with sales C being a result of the addition of salesC+ SalesD
??

I hope that makes sense as that does not work for me
Do you have any other suggestions ??

--
Many Thanks

Alan


"Al Campagna" wrote:

Alan,
You shouldn't be summing the column name, you should be summing the
field in that column.
Given an example like an inventory balance with these 3 example
fields...

PartNo Received Disbursed
123 10
123 5
123 7
123 4

The Received sum would be...
=Sum(Received)
The Disbursed sum would be...
=Sum(Disbursed)
The Balance would be...
=Sum(Received) - Sum(Disbursed)
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your
life."


"Alan" wrote in message
...
I have a continuous sub form that uses a query that totals various
aspects
of
the business against departments.

I can present each field(cloumn) individually no problems and it
displays
as
expected.What I would like to do is sum accross columns from the
ControlSource
Thus I would like a Textbox in my form to display the Sumof Column A,
Column
B and Column C

I have tried seting the control source to =SUM(ColumnA+ColumnB+ColumnC)
which produces an error condition.

Any thoughts would be greatfully appreciated


--
Many Thanks

Alan






  #6  
Old July 12th, 2008, 08:10 AM posted to microsoft.public.access.forms
Alan
external usenet poster
 
Posts: 459
Default Continuous Forms - Sum of Values

Al

Sorry I am using a simple select query as ateh control source for the subform
and then selecting the query values.
I believe Garys post may be the simplest option and have it working

Thanks for all your help
--
Many Thanks

Alan


"Al Campagna" wrote:

Alan,
Giving us examples helps a lot. But, if you have trouble with your
code, please include that in your post. (Cut & Paste exactly)

For example, what is the Name of the field that sums SalesA, and what is
the ControlSource.

Are SalesA, B, and C calculated fields on your form?
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your life."


"Alan" wrote in message
...
Al

Thanks for the reply. I have tried this, however simply get the #error
returned
I have my dept sale grouped into five depts and on a continuous form thus
is displayed on the main form as
Department Name SalesA SalesB SalesC
Dept1 5 2 4
Dept1 3 4 7
Dept3 1 6 2

Another column in the controlsource is sales D and I would like to display
as above but with sales C being a result of the addition of salesC+ SalesD
??

I hope that makes sense as that does not work for me
Do you have any other suggestions ??

--
Many Thanks

Alan


"Al Campagna" wrote:

Alan,
You shouldn't be summing the column name, you should be summing the
field in that column.
Given an example like an inventory balance with these 3 example
fields...

PartNo Received Disbursed
123 10
123 5
123 7
123 4

The Received sum would be...
=Sum(Received)
The Disbursed sum would be...
=Sum(Disbursed)
The Balance would be...
=Sum(Received) - Sum(Disbursed)
--
hth
Al Campagna
Microsoft Access MVP
http://home.comcast.net/~cccsolutions/index.html

"Find a job that you love... and you'll never work a day in your
life."


"Alan" wrote in message
...
I have a continuous sub form that uses a query that totals various
aspects
of
the business against departments.

I can present each field(cloumn) individually no problems and it
displays
as
expected.What I would like to do is sum accross columns from the
ControlSource
Thus I would like a Textbox in my form to display the Sumof Column A,
Column
B and Column C

I have tried seting the control source to =SUM(ColumnA+ColumnB+ColumnC)
which produces an error condition.

Any thoughts would be greatfully appreciated


--
Many Thanks

Alan






 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 12:21 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.