Thank you eghtebas:
In the detail section, in design view, there's one bound control and one unbound control calculating the rounded value of the first one. I'm not clear what Me!,txtVal1, Me!,txtVal2, .. refer to
Main Topics
Browse All TopicsIn a report, I added the bound controls (fields) I need in the detail section. I added unbounded controls to round the value of the original controls. How to I create a sum of the new unbounded controls?
This Question has been solved and asker verified All Experts Exchange premium technology solutions are available to subscription members.
Experts Exchange has been collecting answers to technology questions since 1996…3 million and counting! If you have a question, chances are we already have your answer.
If you can't find the exact answer you're looking for, ask our exclusive community of 50,000 experts. You’ll get a personalized answer from a trusted professional.
Thousands of free tech tips, tricks, how-to’s and tutorials are available in our peer reviewed articles section. See for yourself how smart our experts are, no login required.
Access the answers to your technology questions today.
30-day free trial. Register in 60 seconds.
Members of the expert community talk about why the experience at Experts Exchange is different than what you will find anywhere else.

Try it out and discover for yourself.
30-day free trial. Register in 60 seconds.
Join the community of experts here and help other tech pros by answering question in your area of expertise. You can earn FREE access to all Experts Exchange's premium features and resources.
in
Me!txtSum = Nz(Me!,txtVal1) + Nz(Me!,txtVal2) + Nz(Me!,txtVal3)
txtSum is the unbound text box where you want your sum to show.
txtVal1 is the text box where your 1st value is, Likewise
txtVal2 is the text box where your 2nd value is, etc.
To format it you can also use:
Me!txtSum = Format(Nz(Me!,txtVal1) + Nz(Me!,txtVal2) + Nz(Me!,txtVal3) ,"0,000.0#")
for example.
Another line of logic would be to create a query and simply drop in the Value you want to rounded twice.
Something like this:
SELECT YourTable.ID, YourTable.YourValue, YourTable.YourValue AS YourValueRounded
FROM YourTable;
This way it is easy to just create the report from the query, and then format the second "Value" field the way you want.
Then simply sum this extra field.
Meaning you don't have to open the report in design view and:
1. Add lots of unbound textboxes into the report one at a time individually
2. Align these controls one at a time individually
3. Format these controls one at a time individually
Oy!
4. But most importantly, you don't have to add the controls together one at a time individually!
You can simply sum the "Rounded" field, like so:
=Sum(YourRoundedValues)
...in one control, instead of doing this:
Me!txtSum = Format(Nz(Me!,txtVal1) + Nz(Me!,txtVal2) + Nz(Me!,txtVal3) ,"0,000.0#")
(Suppose you had 25 fields to sum?!)
:-O
(Of course you could just open the report in design view and copy the field, if you like.)
I just find it good practice to have the query do all the "Heavy Lifting".
There are many Form and Report Formatting issue that are cleared up by simply doing the formatting in the source query.
;-)
Here is a sample
JeffCoachman
Thanks,
But bear in mind that the posts by the previous experts were just as valid as my post.
So you should have really split the points among all the valid solutions.
;-)
I mean, you did say: " Thank you *all* "
There are at least a half dozen way of doing what you are asking.
Please click the "Request Attention" Button and ask that the points be split evenly between all the valid posts.
;-)
JeffCoachman
Jeff,
I'll gladly do that.
I could not get Helen's suggestion to work. I named the calculated unbound control and used the sum function on the named control. It asked for as parameter input. I was hoping for this to work. Your suggestion obviously works.
I would love it if Helen's could elaborate so I can learn what I'm doing wrong.
Again, thanks all.
Albert
You have a textbox with a control source of: =Sum([Rounded])
... yet there is no field named "Rounded" so you get a parameter prompt when you open the report.
You can only use =Sum(XXXX) where XXX is a "Field".
This will not work for textboxes.
So in your case the Control source for both Report Footer Textboxes should be the same.
=Sum([YourValue])
But now I am starting to get confused again.
\O_o/
Again I feel that a even split between all the experts sounds fair, as we all presented valid suggestions in our posts.
;-)
JeffCoachman
Business Accounts
Answer for Membership
by: eghtebasPosted on 2009-09-13 at 07:06:39ID: 25320206
In the on format event of the detail section add:
Me!txtSum = Nz(Me!,txtVal1) + Nz(Me!,txtVal2) + Nz(Me!,txtVal3)