Solved Calculate and Store Number-Doubles with two Decimal places Only

Sha

New member
Local time
Today, 23:24
Joined
Jun 29, 2022
Messages
3
Hello Everyone,

I am trying to create Sales and Collection System. I have number fields stored as Double. Most of these are calculated in the form level.
In the after update event of the Gross Sales, Taxable Sales, Vat , Withholding Tax and Net of EWT are calculated but I want it to store only the value rounded to two decimal places instead of the exact calculated number.

Gross Sales: Input

Calculations:

Taxable Sales: Gross Sales/(1.12)
Vat: Taxable Sales * 12%
EWT: Taxable Sales * Tax Rate
Net of EWT: Gross Sales - EWT

Hope you could help me with this. Thank you !
 
Silly me, I forgot the round function 🤦‍♂️ Now it's all good.
 
You shouldn't store calculated values. From all the fields you listed above only [Gross Sales] and [Tax Rate] should be fields in tables. The rest should live in a query where you do all those calculations and apply the Round() function.
 

Users who are viewing this thread

Back
Top Bottom