Andrew
November 6th, 1999, 12:39 PM
In a MSAccess database I have a date column in the General Date format dd/MM/yyy HH.mm.ss and two DTPickers with the same custom format.
In the following routine:
private Sub Command1_Click()
Adodc1.RecordSource = "SELECT date FROM " & _
"Table1 WHERE date BETWEEN #" & _
DTPicker1(0).Value & "# AND #" & _
DTPicker1(1).Value & "# ORDER BY date"
set DataGrid1.DataSource = Adodc1
End Sub
for some reason the filter ignores the hour value of the second DTPicker. For example with DTPicker values of 1/1/1999 12.00.00 and 2/1/1999 12.00.00 the filter selects all records for 1/1/1999 that fall after 12.00.00 and all records for 2/1/1999 no matter what the hour value is.
Any ideas as to why this is happening?
Thanks,
Andrew
In the following routine:
private Sub Command1_Click()
Adodc1.RecordSource = "SELECT date FROM " & _
"Table1 WHERE date BETWEEN #" & _
DTPicker1(0).Value & "# AND #" & _
DTPicker1(1).Value & "# ORDER BY date"
set DataGrid1.DataSource = Adodc1
End Sub
for some reason the filter ignores the hour value of the second DTPicker. For example with DTPicker values of 1/1/1999 12.00.00 and 2/1/1999 12.00.00 the filter selects all records for 1/1/1999 that fall after 12.00.00 and all records for 2/1/1999 no matter what the hour value is.
Any ideas as to why this is happening?
Thanks,
Andrew