Jimbob
Apr 2nd, 2000, 06:15 PM
I'm attempting to use 2 masked edit boxes to input a date range (using the format dd/mm/yy) for searching an access database. my app generates a query similar to the one below: -
select * from onsites where date >= #02/04/00# and date <= #30/04/00# order by date;
(onsites being a table, and date being a value within it)
my problem is that the query creates a recordset containing ALL records in the table, unless the dd part of the date is >= to the mm part of the date, eg 04, 05, 06 etc /04/00, in which case the query works as i would expect.
Initially I thought that the date format may be set to mm/dd/yy, but the date value can be > 12, so perhaps not.
I've tried removing the >= and just specifying = in the query, but this made no difference.
I have been able to select an exact date using a LIKE clause, but really need to select a range of dates.
has anyone got any ideas what i'm doing wrong here, or is it just a flaw in the database engine...??
select * from onsites where date >= #02/04/00# and date <= #30/04/00# order by date;
(onsites being a table, and date being a value within it)
my problem is that the query creates a recordset containing ALL records in the table, unless the dd part of the date is >= to the mm part of the date, eg 04, 05, 06 etc /04/00, in which case the query works as i would expect.
Initially I thought that the date format may be set to mm/dd/yy, but the date value can be > 12, so perhaps not.
I've tried removing the >= and just specifying = in the query, but this made no difference.
I have been able to select an exact date using a LIKE clause, but really need to select a range of dates.
has anyone got any ideas what i'm doing wrong here, or is it just a flaw in the database engine...??