DLookup

mugman17

Registered User.
Local time
Today, 17:16
Joined
Nov 17, 2000
Messages
110
I am trying to look up an exchange rate from my table called tblExchange when the ExchangeDate matches the TransactionDate on my report or form. But I cannot seem to get it to work. What is the proper code of the DLookup, so I can compare to what I have?

Thanks.
 
DLookup("[ExchangeRate]", "tblExchange", "[ExchangeDate]=#" & Forms!frmMyForm!txtTransactionDate & "#")

Assuming a few things:
That the field in tblExchange is called 'ExchangRate', that your DLookup is not being used as part of an SQL string in a module and that your transaction date source is in fact from a form (named frmMyForm with a TextBox named txtTransactionDate, as an example).
 

Users who are viewing this thread

Back
Top Bottom