What about putting 1.1 in tax1 and 1.2 in tax2
Because if the tax changes you don't have to change the formula
Just thinking ahead
hope this help
See clear as mud
the aim is store once, not store multiple times
Remember... Optimize 'til you die!
Progaming environment: Access based on my own environment: DAO3.6/A97/A2000/A2003/A2007/A2010 VB based on my own environment: vb6 sp5 ASP based on my own environment: 5.6 VB-NET based on my own environment started 2007 SQL-2005 based on my own environment started 2008 MYLE YOUR PASSWORD IS JUST LIKE YOUR TOOTHBRUSH DON'T SHARE IT.
Hi myle, the db I'm working with is the back end of an ePOS system, and the tax rates are actually stored in another table, called TaxRates.
The Tax1 and Tax2 Fields in the table I'm linking to and running the query from are Yes/No Fields, and in the VB Frontend the calculations are run automatically, and the values are stored in the Receipts table.
Do you think it would be possible to call in the Tax1 and Tax2 fields from the TaxRates table and have the calculation run based on their values?
If so, can you please give me an example.
There is no rush in this as chris's post has resolved the issue for now, but I'm always interested in learning a bit more.
SELECT Table1.RetailPrice, Table1.Tax1, Table1.Tax2, IIf([Table1].[Tax1]=True,([RetailPrice]*[TaxRates].[Tax1]),(IIf([Table1].[Tax2]=True,([RetailPrice]*[TaxRates].[Tax2]),[RetailPrice]))) AS Total
FROM Table1, TaxRates;