Summing an Unbound Textbox

P

Playa

I have an unbound textbox for each record with number values in them at the
end of my report I want to add all the values up. How would I do that?
 
M

Marshall Barton

Playa said:
I have an unbound textbox for each record with number values in them at the
end of my report I want to add all the values up. How would I do that?


If the number values are calculated from fields in the
report's record source table/query, e.g.
=[Price] * [Quantity]
then just use the same expression in a report footer text
box, e.g.
=Sum([Price] * [Quantity])

If you have to use code to calculate the number values, then
add an invisible text box named txtRunValue to the detail
section, Set its control source to =unboundtextboxname and
its RunningSum property to Over All. The report footer text
box can then display the sum by using the expression
=txtRunValue
 
P

Playa

The answer I left below works with my senario, however I don't want to total
each record in the detail section, I want the total to be in the report
footer. I guess I could just hide that textbox but then How would I get the
grand total in the footer section?
 
P

Playa

Your response worked when I did it in the detail section of my report. I
actually want to put the grand total in my report footer section and it does
not work there. For some reason I can't get the Total sum in my report
footer. Does that help?

Thanks for all your help so far.

The problem with it being in the detail section is it shows the total for
every record, I really just want to show the final grand total after the last
record.



Marshall Barton said:
The way I read this followup question, I believe that I
addressed it in my previous response. If not, please add
some more information about what part of it didn't do what
you want.
--
Marsh
MVP [MS Access]


The answer I left below works with my senario, however I don't want to total
each record in the detail section, I want the total to be in the report
footer. I guess I could just hide that textbox but then How would I get the
grand total in the footer section?
 
P

Playa

Never mind I actually finally figured it out. Thanks for all your help.

Marshall Barton said:
The way I read this followup question, I believe that I
addressed it in my previous response. If not, please add
some more information about what part of it didn't do what
you want.
--
Marsh
MVP [MS Access]


The answer I left below works with my senario, however I don't want to total
each record in the detail section, I want the total to be in the report
footer. I guess I could just hide that textbox but then How would I get the
grand total in the footer section?
 

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