Dlookup Date problem

A

adriany

txtbox2 = DLookup("[field1]", "table1", "[field2]= '" &
[field2] & "'")

when field1 is text this code works fine
when field1 is date is not working at all.

can anyone help me with this one
 
G

Gerald Stanley

Try
txtbox2 = DLookup("[field1]", "table1", "[field2]= #" &
Format([field2], 'mm/dd/yy') & "#")

Hope This Helps
Gerald Stanley MCSD
 
Top