Dlookup changing Vat

eyalco

Registered User.
Local time
Today, 15:00
Joined
Jul 24, 2007
Messages
50
I have an invoice form (access 2003) where vat is a part of payment. The problem is : when VAT changes, I want the new VAT to be placed in my form.
I have a VAT table where I have [from date] - [to date] and the relevant VAT.
I'm trying to use :

DlookUp("[MyField]","MyTable","#07/02/2009# Between [from_date] And [to_date]")

But VAT taken is the old VAT (the change was on july 1st).

What can I do please?
Thanks.
 
eyalco,

Your going to have to use criteria something like the following air code (syntax is not correct):

[to date] >= #07/02/2009# AND [from date] <= #07/02/2009#

You will need to work out the syntax. You may find it easier to use the QBE to create a query that will return the correct VAT and then see if you can reduce that query to work with the Dlookup function.
 

Users who are viewing this thread

Back
Top Bottom