• FindNext problem (Win XP Office 2003)

    Author
    Topic
    #455991

    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

    Viewing 0 reply threads
    Author
    Replies
    • #1137604

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

      • #1137701

        > 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.

    Viewing 0 reply threads
    Reply To: FindNext problem (Win XP Office 2003)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: