Results 1 to 3 of 3
  1. #1
    tarenja is offline Novice
    Windows XP Access 2007
    Join Date
    Jul 2013
    Posts
    15

    Findfirst syntax problem

    I can successfully loop through a recordset and display each record using the code: Debug.Print rsC![activityid], rsC![Timeslot], rsC![Activity]
    What I can't figure out is the syntax for findfirst
    I want to loop through each item in the recordset rsC and compare rsC![activityid], with another recordset, rsB, that also has an ID field rsB![activityid]
    Can anyone help me with the systax for the findfirst part please (I'm fine with the looping part, I just can't get the findfirst syntax correct).

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,848

  3. #3
    tarenja is offline Novice
    Windows XP Access 2007
    Join Date
    Jul 2013
    Posts
    15
    Thanks for your help.
    My problem turned out to be I was testing for a value that was in the second column of the recordset.
    It seems you can't do it.
    When I changed the sql statement to bring in the field that I was testing for first the problem went away.
    If it's of any value to anyone this is the syntax I ended up using:
    If Not rsB.NoMatch Then
    rsC.FindFirst "ActivityID = " & Arrayids(i)
    Works fine now.

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

Similar Threads

  1. Syntax problem
    By cheyanne in forum Access
    Replies: 7
    Last Post: 05-20-2012, 11:30 PM
  2. using FindFirst with a Date Criteria (syntax error)
    By ajetrumpet in forum Programming
    Replies: 2
    Last Post: 09-10-2010, 11:01 PM
  3. RST Findfirst date problem
    By ColPat in forum Programming
    Replies: 3
    Last Post: 08-09-2010, 07:28 AM
  4. Recordset Findfirst Problem
    By ColPat in forum Programming
    Replies: 6
    Last Post: 07-22-2010, 04:34 AM
  5. Syntax Contains Problem
    By pimlicosnail in forum Forms
    Replies: 9
    Last Post: 02-18-2010, 12:16 PM

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