Results 1 to 3 of 3
  1. #1
    4 Star Lounger
    Join Date
    Apr 2001
    Location
    Guatemala City
    Posts
    515
    Thanks
    0
    Thanked 0 Times in 0 Posts

    FindNext problem (Win XP Office 2003)

    This code should pick up all instances of the strSearch, and then exit when there are no more matches. All is well until the last record is processed. Then we stay in a loop. Where am I in the file after there are no more matches? I am assuming that the last FindNext will take me to the EOF if there are no more matches. Is that correct?

    With rstFacturaHistoria
    .FindFirst strSearch
    Do While Not .EOF
    .Edit
    !IdCarnet = Forms!MainQryPedidos1!IdCarnet
    Debug.Print !Factura
    .Update
    .FindNext strSearch
    Loop
    .Close
    End With

  2. #2
    4 Star Lounger
    Join Date
    Apr 2001
    Location
    Guatemala City
    Posts
    515
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: FindNext problem (Win XP Office 2003)

    Using NoMatch rather than EOF works. Does the unmatched FindNext stay on the last record found?

  3. #3
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: FindNext problem (Win XP Office 2003)

    > Does the unmatched FindNext stay on the last record found?

    Yes, it does. In other words, it does NOT move to the end of the recordset if no match is found.

Posting Permissions

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