Hey guys,
I'm trying to pull information out of a database where the date is equal to (whateva). But i keep ending up with no records even when i know that the data exists.
The field in the database is set to the date format "2005/05/17".
and newdate in the code is the same format "2005/05/17"
I just don't understand....
Code...
Public Sub Change_Date(newdate As Date)
Dim dateRS As Recordset
Set dateRS = DB.OpenRecordset("SELECT FixtureDate FROM Fixtures Where fixturedate = " & newdate & "")
If dateRS.RecordCount <> 0 Then
Fdate = dateRS.Fields("fixturedate").Value
End If
End Sub
Thank you
I'm trying to pull information out of a database where the date is equal to (whateva). But i keep ending up with no records even when i know that the data exists.
The field in the database is set to the date format "2005/05/17".
and newdate in the code is the same format "2005/05/17"
I just don't understand....
Code...
Public Sub Change_Date(newdate As Date)
Dim dateRS As Recordset
Set dateRS = DB.OpenRecordset("SELECT FixtureDate FROM Fixtures Where fixturedate = " & newdate & "")
If dateRS.RecordCount <> 0 Then
Fdate = dateRS.Fields("fixturedate").Value
End If
End Sub
Thank you