Calculated totals within a form

P

Pass-the-reality

I have a form (frmTesterInfo). Within the form, I have 4 text boxes. The
text boxes are Total Executed, P, RB and FB. I want the text box Total
Executed to add up the data that is keyed into P, RB and FB. I tried to
create a Macro (SetValue) and I could not get it to work. What is the
easiest way to get these fields to add up.
 
R

Roger Carlson

In the ControlSource property of the TotalExecuted textbox, add this:

=Me.P+Me.RB+Me.FB

Now, your next question will be: how do I get this to store in the table?
and the answer is that YOU DON'T. You shouldn't store calculated values in
your table. Instead, you should recalculate them in a query, form or report
every time you need it.

--
--Roger Carlson
MS Access MVP
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L
 
J

Jamie Hornstein

The easiest way (IMO) to do this is to just set the datasource property of
the Total Exectured textbox equal to "=[P].Value+[RB].Value+[FB].Value"

(no quotes)
 
Top