Dlookup Date problem

  • Thread starter Thread starter adriany
  • Start date Start date
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
 
Try
txtbox2 = DLookup("[field1]", "table1", "[field2]= #" &
Format([field2], 'mm/dd/yy') & "#")

Hope This Helps
Gerald Stanley MCSD
 
Back
Top