Set rec = CurrentDb().OpenRecordset(strsql)
If Not rec.EOF Then
If rec(0) > 0 Then
If the date reads say 4/12/2007 I get zero records.(There ARE 4/12/2007 dates in the table)
If the date reads 13/12/2007 I get the correct record count.
There appears to be a conflict with the day and the month - cannot decide whether US date or English date.
How do I resolve this?
Like Startrekker, personally I prefer to use mmm as the date format, except for those very odd occasions where space may be critical, to me it looks nicer but the real reason is that it always avoids confusions over dates. it doesn't matter if the month precedes the day (US format) or follows the day (most of the world format)...... its immediately clear to all what the date actually is with minimum fuss.
When i build a SQL STATEMENT IN CODE date must be in usa format
so I have this function
USAdate = month(vdate) & "/" & day(vdate) & "/" & Year(vdate)
WHERE appt_date = #" & USADate(Me.TxtApptDate) & "#"
hope this help
See clear as mud
the aim is store once, not store multiple times
Remember... Optimize 'til you die!
Progaming environment: Access based on my own environment: DAO3.6/A97/A2000/A2003/A2007/A2010 VB based on my own environment: vb6 sp5 ASP based on my own environment: 5.6 VB-NET based on my own environment started 2007 SQL-2005 based on my own environment started 2008 MYLE YOUR PASSWORD IS JUST LIKE YOUR TOOTHBRUSH DON'T SHARE IT.