Results 1 to 2 of 2
  1. #1
    tuyo is offline Novice
    Windows XP Access 2007
    Join Date
    Mar 2011
    Posts
    9

    Unhappy table traversal


    Hi!
    i need help in my code. i need to use the field values in one table and check if the same values are in the other table.

    table 1 table 2
    a charles a
    b george a
    c junior c

    so far i have

    With table
    Do Until .EOF
    .MoveLast
    .MoveFirst
    For Each fld In .Fields
    If fld.Name = "branch" Then
    Call Searchtable2
    End If
    Next
    Loop
    End With
    Exit Sub


    my problem is, table 1 doesnt move to the next row. it only goes through it once. help pls!
    Thanks

  2. #2
    jzwp11 is offline VIP
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2010
    Location
    Dayton, OH
    Posts
    2,901
    I believe you need a .movenext

    With table
    Do Until .EOF
    .MoveLast
    .MoveFirst
    For Each fld In .Fields
    If fld.Name = "branch" Then
    Call Searchtable2
    End If
    Next

    .MoveNext
    Loop
    End With
    Exit Sub

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

Similar Threads

  1. Replies: 2
    Last Post: 10-27-2009, 07:09 AM

Tags for this Thread

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