Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 2 / July 2007

Tip: Looking for answers? Try searching our database.

Calculated totals within a form

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Pass-the-reality - 30 Jul 2007 16:20 GMT
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.
Roger Carlson - 30 Jul 2007 16:31 GMT
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.

Signature

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

>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.
Jamie Hornstein - 30 Jul 2007 16:34 GMT
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)

> 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.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.