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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
How do I add field totals
I have a Form with 3 text boxes. I want to add the figures in Box 1 and Box
2 and make it show up in Box 3. How do I do that? Sorry, I'm pretty new to Access. Thanks -- Bobc SRES, LLC |
#2
|
|||
|
|||
How do I add field totals
One way to do this would be to do the calculation in a query, then use that
query to "feed" the form. Regards Jeff Boyce Microsoft Access MVP -- Disclaimer: This author may have received products and services mentioned in this post. Mention and/or description of a product or service herein does not constitute endorsement thereof. Any code or pseudocode included in this post is offered "as is", with no guarantee as to suitability. You can thank the FTC of the USA for making this disclaimer possible/necessary. "BobC" wrote in message ... I have a Form with 3 text boxes. I want to add the figures in Box 1 and Box 2 and make it show up in Box 3. How do I do that? Sorry, I'm pretty new to Access. Thanks -- Bobc SRES, LLC |
#3
|
|||
|
|||
How do I add field totals
On Fri, 11 Dec 2009 16:44:01 -0800, BobC wrote:
I have a Form with 3 text boxes. I want to add the figures in Box 1 and Box 2 and make it show up in Box 3. How do I do that? Sorry, I'm pretty new to Access. Thanks Well, yes you could in theory. But why would you want to in practice? As long as you have saved, in a table, the values in "Box1" and Box2" Let's call them by their more proper names (they are not Boxes). In a table, they are Fields. On a Form or Report they are Controls. Anytime you need to see the sum of the 2 controls, calculate it. In a query: SumOfFields: Nz([Field1]) + Nz([Field2]) or directly in the control source of an unbound control on a form or report: = Nz([Control1]) + Nz([Control2]) In any event, saving the calculated value is not necessary and can lead to incorrect stored values if, for example, one of the individual values is changed in the future. As a general rule, in Access one does not store calculated values. Also, look up the Nz function in VBA help -- Fred Please respond only to this newsgroup. I do not reply to personal e-mail |
#4
|
|||
|
|||
How do I add field totals
fredg wrote:
"Well, yes you could in theory. But why would you want to in practice... As a general rule, in Access one does not store calculated values." Everything you said is true, Fred, but where in the original post "I have a Form with 3 text boxes. I want to add the figures in Box 1 and Box 2 and make it show up in Box 3. How do I do that?" did the OP say anything about storing the calculation? All I see is that he wants the results to show in Box3, which is a reasonable request. -- There's ALWAYS more than one way to skin a cat! Answers/posts based on Access 2000/2003 Message posted via http://www.accessmonster.com |
Thread Tools | |
Display Modes | |
|
|