Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date Comparison 1

Status
Not open for further replies.

iamedwardkim

IS-IT--Management
Nov 7, 2002
29
US
Hi,

I am trying to compare a date in a table to a date in a text box on a form. I have a feeling it's because the two dates may not be of the same data type. Any ideas?
 
Hi

So what is going wrong?

If problem is data type have you tried CDate() as in (say) CDate(txtDate)? Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
UK
 
Yes, the DLookup criteria has been set to:

"[PayRateEffDate] = " & CDate(Me.DateWorked).
 
Hi

Are you in the UK, or at least outside of USA?

If yes, it may be you have to quote the date in US format (eg mm/dd/yy) and bound it in #..#

I never use DLookup, so I cannot be sure about its possible quirks Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
UK
 
Bounding the string date in #'s worked. Thank you again.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top