Results 1 to 3 of 3

Thread: Problem with ADO Filter property

  1. #1

    Thread Starter
    New Member
    Join Date
    Mar 2000
    Posts
    2

    Post


    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?

  2. #2
    Member
    Join Date
    Oct 1999
    Location
    Snellville, GA, USA
    Posts
    38
    Maybe you need a tick before your variable.

    rs.Filter = "'" & strField & "'=' " & strDate & "'"
    instead of:
    rs.Filter = strField & "=' " & strDate & "'"

    -Elias


  3. #3

    Thread Starter
    New Member
    Join Date
    Mar 2000
    Posts
    2
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width