-
I would like to filter a recordset for records which are equal to or after a specified date and chose to use the ADO Filter property.
The code below:
rs.Filter = strField & "=' " & strDate & "'"
is in the FieldName-Operator-Value syntax and works okay but when I made a small change by substituting ">=’" in place of "=’ " I got a runtime error 3001. I did not expect this and I don't understand why the error occurs. How can I fix this?
-
Maybe you need a tick before your variable.
rs.Filter = "'" & strField & "'=' " & strDate & "'"
instead of:
rs.Filter = strField & "=' " & strDate & "'"
-Elias
-
Thanks Elias but it did not work. If you or anyone else have any other ideas on how to solve this problem please post them here. Any suggestions will be very much appreciated.
Thanks in advance.