Sums based on textbox calculates

G

Guest

I have a report with some text box that perform some simple calculates (
Text3 = [Text1] – [Text2]) and I’m trying to sum the valves (=Sum()) up in
the report footer with no luck. The calculates work fine, i just can't Sum
them.
If I do a =Sum(TextName) I get a message box asking for a Parameter valve
for that text box. If I try to qualify it
=Sum([Reports]![ReportName]![TextName]) I get nothing.
Any ideas?
 
G

Guest

You can't sum controls. You can sum fields/expressions from your report's
record source:
=Sum([Text1] – [Text2])
 
G

Guest

Unfortunately that will not work for this application.
Can I do a for next loop in the format event to sum up my vavles? How would
I get the record count in the detail field so I know how many times to cycle
the loop?

--
thank You


Duane Hookom said:
You can't sum controls. You can sum fields/expressions from your report's
record source:
=Sum([Text1] – [Text2])
--
Duane Hookom
Microsoft Access MVP


Gus Chuch said:
I have a report with some text box that perform some simple calculates (
Text3 = [Text1] – [Text2]) and I’m trying to sum the valves (=Sum()) up in
the report footer with no luck. The calculates work fine, i just can't Sum
them.
If I do a =Sum(TextName) I get a message box asking for a Parameter valve
for that text box. If I try to qualify it
=Sum([Reports]![ReportName]![TextName]) I get nothing.
Any ideas?
 
G

Guest

"Unfortunately that will not work for this application" Why not? I would
rather provide an easy, quality solution rather than resorting to convoluted
code in your report. If you think it won't work, you should tell us why...

--
Duane Hookom
Microsoft Access MVP


Gus Chuch said:
Unfortunately that will not work for this application.
Can I do a for next loop in the format event to sum up my vavles? How would
I get the record count in the detail field so I know how many times to cycle
the loop?

--
thank You


Duane Hookom said:
You can't sum controls. You can sum fields/expressions from your report's
record source:
=Sum([Text1] – [Text2])
--
Duane Hookom
Microsoft Access MVP


Gus Chuch said:
I have a report with some text box that perform some simple calculates (
Text3 = [Text1] – [Text2]) and I’m trying to sum the valves (=Sum()) up in
the report footer with no luck. The calculates work fine, i just can't Sum
them.
If I do a =Sum(TextName) I get a message box asking for a Parameter valve
for that text box. If I try to qualify it
=Sum([Reports]![ReportName]![TextName]) I get nothing.
Any ideas?
 
G

Guest

I have a group of customers, each customer has several pieces of equipment,
each piece of equipment generates income (txtIncome or in this case
txtSumOfIncome). The customer will get a percentage of the income (txtPayOut)
but the percentage will very from piece to piece of equipment. And the
remaining balance is the difference of the two (txtNet = txtSunOfIncome –
txtPayOut).
So on my report in the detail I have 4 columns txtEquipmentID,
txtDescription, txtSumOfIncome, txtPayout and txtNet. The frist three come
from the reports query. I get the valve of txtPayOut by using a DLookUp
using the equipment ID for the percentage of that piece of equipment
=DLookUp("[Precentage]","tblEquipment","[EquipmentID] =" &
"[Reports]![IncomeReport]![EquipmentID]")/100*[txtSumOfIncome]
I then use the two textboxes to find the txtNet.
=[SumOfIncome]-[txtPayOut]
Now it the report footer I would like to sum each column up.
Sum(txtSumOfIncome) work find but some how I would like to sum up the other
2 columns (textboxes).
I guess I could generate a new query that has all this information and then
base my reports query off of that, but I would rather have it all in the
report.
Does this help?

--
thank You


Duane Hookom said:
"Unfortunately that will not work for this application" Why not? I would
rather provide an easy, quality solution rather than resorting to convoluted
code in your report. If you think it won't work, you should tell us why...

--
Duane Hookom
Microsoft Access MVP


Gus Chuch said:
Unfortunately that will not work for this application.
Can I do a for next loop in the format event to sum up my vavles? How would
I get the record count in the detail field so I know how many times to cycle
the loop?

--
thank You


Duane Hookom said:
You can't sum controls. You can sum fields/expressions from your report's
record source:
=Sum([Text1] – [Text2])
--
Duane Hookom
Microsoft Access MVP


:

I have a report with some text box that perform some simple calculates (
Text3 = [Text1] – [Text2]) and I’m trying to sum the valves (=Sum()) up in
the report footer with no luck. The calculates work fine, i just can't Sum
them.
If I do a =Sum(TextName) I get a message box asking for a Parameter valve
for that text box. If I try to qualify it
=Sum([Reports]![ReportName]![TextName]) I get nothing.
Any ideas?
 
G

Guest

I would add tblEquipment into the report's record source and join the
EquipmentID fields. You can then add Percentage to the field list of the
report or even create a column like:
[Percent]/100*[txtSumOfIncome]
or something.

This will allow you to use the standard =Sum(..expression..)

--
Duane Hookom
Microsoft Access MVP


Gus Chuch said:
I have a group of customers, each customer has several pieces of equipment,
each piece of equipment generates income (txtIncome or in this case
txtSumOfIncome). The customer will get a percentage of the income (txtPayOut)
but the percentage will very from piece to piece of equipment. And the
remaining balance is the difference of the two (txtNet = txtSunOfIncome –
txtPayOut).
So on my report in the detail I have 4 columns txtEquipmentID,
txtDescription, txtSumOfIncome, txtPayout and txtNet. The frist three come
from the reports query. I get the valve of txtPayOut by using a DLookUp
using the equipment ID for the percentage of that piece of equipment
=DLookUp("[Precentage]","tblEquipment","[EquipmentID] =" &
"[Reports]![IncomeReport]![EquipmentID]")/100*[txtSumOfIncome]
I then use the two textboxes to find the txtNet.
=[SumOfIncome]-[txtPayOut]
Now it the report footer I would like to sum each column up.
Sum(txtSumOfIncome) work find but some how I would like to sum up the other
2 columns (textboxes).
I guess I could generate a new query that has all this information and then
base my reports query off of that, but I would rather have it all in the
report.
Does this help?

--
thank You


Duane Hookom said:
"Unfortunately that will not work for this application" Why not? I would
rather provide an easy, quality solution rather than resorting to convoluted
code in your report. If you think it won't work, you should tell us why...

--
Duane Hookom
Microsoft Access MVP


Gus Chuch said:
Unfortunately that will not work for this application.
Can I do a for next loop in the format event to sum up my vavles? How would
I get the record count in the detail field so I know how many times to cycle
the loop?

--
thank You


:

You can't sum controls. You can sum fields/expressions from your report's
record source:
=Sum([Text1] – [Text2])
--
Duane Hookom
Microsoft Access MVP


:

I have a report with some text box that perform some simple calculates (
Text3 = [Text1] – [Text2]) and I’m trying to sum the valves (=Sum()) up in
the report footer with no luck. The calculates work fine, i just can't Sum
them.
If I do a =Sum(TextName) I get a message box asking for a Parameter valve
for that text box. If I try to qualify it
=Sum([Reports]![ReportName]![TextName]) I get nothing.
Any ideas?
 

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