Calculated totals within a form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
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
 
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)
 

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

Similar Threads


Back
Top