G
Guest
In a sql select statement, the data is not being restriced to a date range
even though the start & end date values are verified to be correct. The data
is displayed without being restricted by the where clause. Date is a field in
the table. What am I doing wrong. Thanks.
There are no errors in the following code:
Private Sub db_betw_dates_obj_MouseDown(Button As Integer, Shift As Integer,
X As Single, Y As Single)
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim strSQL As String
Set db = CurrentDb
strSQL = "select * FROM roncheck_access " _
& "where [roncheck_access].[DATE] Between " _
& "#" & start_date_cal.Value & "# And #" & end_date_cal.Value & "#;"
Set rs = db.OpenRecordset(strSQL)
End Sub
even though the start & end date values are verified to be correct. The data
is displayed without being restricted by the where clause. Date is a field in
the table. What am I doing wrong. Thanks.
There are no errors in the following code:
Private Sub db_betw_dates_obj_MouseDown(Button As Integer, Shift As Integer,
X As Single, Y As Single)
Dim db As DAO.Database
Dim rs As DAO.Recordset
Dim strSQL As String
Set db = CurrentDb
strSQL = "select * FROM roncheck_access " _
& "where [roncheck_access].[DATE] Between " _
& "#" & start_date_cal.Value & "# And #" & end_date_cal.Value & "#;"
Set rs = db.OpenRecordset(strSQL)
End Sub