Kamis, 14 Agustus 2014

RE: [MS_AccessPros] Sales Tax calculation

 

Doyce,
 
Unless there is some VBA in form, the value will not "store ... in a table".  
 
=Round(([LaborPrice]+[MatPrice]+[DeliveryChg])*DLookup("[SalesTaxRate]","[tblSalesTaxRate]"),2)
as a Control Source will display but not store the value.
 
 
Also, if LaborPrice, MatPrice, or DeliveryChg are Null, the calculation will result in Null.
 
Duane Hookom MVP
MS Access
 

From: Doyce

John,
DLookup works like a charm!! Thanks, I've never used that before but will in the future!!
 
Doyce---In MS_Access_Professionals@yahoogroups.com, <JohnV@...> wrote :
Doyce-
Unless tblSalesTaxRate is in the underlying query, you can't reference it that way.  You could embed a DLookup in place of the reference sot SalesTaxRate.
John Viescas, Author


On Aug 14, 2014, at 7:14 PM, winberry.doyce@... [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:

Hello friends,
I need to calculate sales tax which is a percentage of a purchase total. I want to store the sales tax percentage in a table. Here is my formula but it is not working.
=Round(([LaborPrice]+[MatPrice]+[DeliveryChg])*[tblSalesTaxRate]![SalesTaxRate],2)
What is the correct way to reference the value in the SalesTaxRate field of my table?
Doyce

__._,_.___

Posted by: Duane Hookom <duanehookom@hotmail.com>
Reply via web post Reply to sender Reply to group Start a New Topic Messages in this topic (4)

.

__,_._,___

Tidak ada komentar:

Posting Komentar