jadedinvasion
Programmer
Okay so I'm having an issue with setting a filter on a ADO recordset using a field that has a date datatype.
Here how I set up my connection:
Dim objStatConn As ADODB.Connection
Dim objStatRS As ADODB.Recordset
Set objStatConn = New ADODB.Connection
objStatConn.ConnectionString = "Driver={Microsoft Access Driver (*.mdb)};" & _
"Dbq=C:\working\records.mdb ;pwd=five"
objStatConn.Open
Set objStatRS = New ADODB.Recordset
objStatRS.CursorLocation = adUseClient
strSQL = "SELECT * FROM my RecordTable"
objStatRS.Open strSQL, objStatConn, adOpenForwardOnly
Set objStatRS.ActiveConnection = Nothing
objStatRS.Filter = "CRT_DTE = #7/26/2006#"
After putting a watch on the recordset, i see that before I apply the filter everything is groovy.
But once I set the filter, it gives me an error with the bookmark being "Either BOF or EOF is true, or the current record has been removed...." bla bla
BUT if i were to do something like this:
objStatRS.Filter = "ACT_ID = '1A2345S'"
It works just fine.
Am I missing something?
And Ideas would be most excellent!
Here how I set up my connection:
Dim objStatConn As ADODB.Connection
Dim objStatRS As ADODB.Recordset
Set objStatConn = New ADODB.Connection
objStatConn.ConnectionString = "Driver={Microsoft Access Driver (*.mdb)};" & _
"Dbq=C:\working\records.mdb ;pwd=five"
objStatConn.Open
Set objStatRS = New ADODB.Recordset
objStatRS.CursorLocation = adUseClient
strSQL = "SELECT * FROM my RecordTable"
objStatRS.Open strSQL, objStatConn, adOpenForwardOnly
Set objStatRS.ActiveConnection = Nothing
objStatRS.Filter = "CRT_DTE = #7/26/2006#"
After putting a watch on the recordset, i see that before I apply the filter everything is groovy.
But once I set the filter, it gives me an error with the bookmark being "Either BOF or EOF is true, or the current record has been removed...." bla bla
BUT if i were to do something like this:
objStatRS.Filter = "ACT_ID = '1A2345S'"
It works just fine.
Am I missing something?
And Ideas would be most excellent!