Results 1 to 4 of 4
  1. #1
    3 Star Lounger
    Join Date
    Sep 2002
    Location
    London, England
    Posts
    294
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Can't get ADO Find to work (2000)

    I have some code that is supposed to step through a recordset returned from a query and update a table with data from that query. The query and the table both have a stock code field and I am trying to use this field to find the record to update in the table. Unfortunately, the find section of my code never finds a match, even though I know that all the stock codes returned by the query will be in the table. I don

  2. #2
    Gold Lounger
    Join Date
    Feb 2001
    Location
    Sint Niklaas, Belgium
    Posts
    2,778
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Can't get ADO Find to work (2000)

    Did it work if you replace the line :
    <pre>strF = "SKU = """ & !sku_code & """"</pre>

    by
    <pre>strF = "SKU = '" & !sku_code & "'"</pre>

    Francois

  3. #3
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Can't get ADO Find to work (2000)

    I don't understand what you are doing. You open rst2 on tbl_Final, so where does rst come from? Your code doesn't show how it is populated so there isn't really enough information to tell us what's going on, but I would suspect that you may be mixing ADO and DAO recordsets or that you are already on the matching record. Find will not check the record it starts on.
    Charlotte

  4. #4
    3 Star Lounger
    Join Date
    Sep 2002
    Location
    London, England
    Posts
    294
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Can't get ADO Find to work (2000)

    That worked - ADO.Find needs text to be enclosed in single quotes.
    Thanks

Posting Permissions

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