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 / Modules / DAO / VBA / May 2006

Tip: Looking for answers? Try searching our database.

how & where do I auto sum in a table for invoice total

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Grams - 23 May 2006 17:29 GMT
I would like the table to hold the invoice total but I can't figure out how
(the actual equation) or where to put it so that it auto sums the individual
items and puts the totals in.  
fredg - 23 May 2006 18:10 GMT
> I would like the table to hold the invoice total but I can't figure out how
> (the actual equation) or where to put it so that it auto sums the individual
> items and puts the totals in.

That's an easy one.
You DON'T!

Access is not a spreadsheet and has it's own rules of usage.

Do not store calculated data.
Whenever you need the results of a calculation, calculate it.

Store the various data that make up the total, i.e. [Price],
[Shipping], and [SalesTaxRate]

Then, in a form or report, calculate it in an unbound control.
Set the control's Control Source to:
=(Nz([ItemPrice]) + Nz([Shipping])) * [SalesTaxRate]

In a query it would be:
Total:(Nz([ItemPrice]) + Nz([Shipping])) * [SalesTaxRate]

Note: Look up the Nz() function in VBA help.
Signature

Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail

 
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



©2008 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.