Forum Discussion
VAT calculation
- Jul 19, 2024
Your method works, but you can simplify it by using:
```sql
CCur(Round([Gross Amount] * [VAT Percentage] / (100 + [VAT Percentage]), 2))
```
This https://vatcalculatorsa.co.za/ method keeps it as currency and exports correctly to Excel.
Your method works, but you can simplify it by using:
```sql
CCur(Round([Gross Amount] * [VAT Percentage] / (100 + [VAT Percentage]), 2))
```
This https://vatcalculatorsa.co.za/ method keeps it as currency and exports correctly to Excel.
Hi,
A warning to you and the OP who marked your suggestion as best response:
You should never include the Round() function into anything that has to do with money, because it does not round commercially but uses mathematical or so called banker's rounding, i.e. 5 is rounded down to the nearest even number. This is an ancient problem of the Round() function and discussed a million times since it was introduced with Access 2000.
Therefore Gustav in his suggestions uses the Format() function or a user defined function to round commercially and avoids the rounding errors that happen with Round().
Servus
Karl
****************
Access News, Forever, DevCon
Access-Entwickler-Konferenz AEK - 19./20.10. Nürnberg