Dlookup + Date

laaacux

New member
Local time
Yesterday, 16:21
Joined
Oct 14, 2011
Messages
5
Hi,
I tried a lot of times, search over internet... but no luck.

Table: tbl_CUR_RATES
[...]
CUR_ID - Num
CUR_DATE - date/time

Form: frm_RATES
with button which get CUR_ID on specific date:
1. frm_CUR_DATE
2. frm_CUR_ID

On click for that button is such code in vba...
Me.frm_CUR_ID = DLookup("CUR_ID", "tbl_CUR_RATES", "CUR_DATE=#" & Me.CUR_DATE & "#")

but I get error message 3075 'CUR_DATE = 01.01.2011'

Can anyone help me ..and tell where I have wrong ... format?

Thanks in advance
 
Dates with dots are not the type of Dtae the *#* is looking for. Remove those and treat your date field like a text field and the error should go away.
 

Users who are viewing this thread

Back
Top Bottom