Results 1 to 5 of 5
  1. #1
    RonL is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Nov 2009
    Location
    NJ
    Posts
    114

    recordset .findfirst question

    I'm getting a nomatch on:



    Code:
    .FindFirst .Fields("fldSortOrder") = 4
    even though I know that record is in the recordset (because I can loop through and debug.print it). I've tried putting a .movefirst before it, no help. Also changing the syntax in several ways, all of which produce an error. The above syntax doesn't produce an error; it just doesn't move the pointer.

    Any thoughts?

    Thanks, Ron

  2. #2
    rzw0wr is offline I will always be a newbie
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2013
    Location
    Indiana
    Posts
    479
    post all of your code and be sure to code wrap it.

    Dale

  3. #3
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows XP Access 2003
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,610
    Try:
    .FindFirst ("fldSortOrder=4")
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  4. #4
    RonL is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Nov 2009
    Location
    NJ
    Posts
    114
    Quote Originally Posted by Bob Fitz View Post
    Try:
    .FindFirst ("fldSortOrder=4")
    That works. As does .FindFirst ("fldSortOrder= " & intRankCur) , which is really what I was after. I won't pretend to understand why the .fields() function doesn't work in this context.

    Thank you!

    rzwOwr in case you were wondering, it's a dao.recordset, created by a query and passed to a subroutine as a dao.recordset.

  5. #5
    rzw0wr is offline I will always be a newbie
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2013
    Location
    Indiana
    Posts
    479
    I was thinking that.

    Dale

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 7
    Last Post: 09-28-2023, 08:41 AM
  2. Recordset FindFirst Not Working
    By ShoresJohn in forum Programming
    Replies: 5
    Last Post: 03-01-2012, 06:59 PM
  3. Using FindFirst code
    By saltydawg617 in forum Access
    Replies: 2
    Last Post: 07-29-2011, 05:21 PM
  4. RST Findfirst date problem
    By ColPat in forum Programming
    Replies: 3
    Last Post: 08-09-2010, 07:28 AM
  5. Recordset Findfirst Problem
    By ColPat in forum Programming
    Replies: 6
    Last Post: 07-22-2010, 04:34 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums