B
Bill
In the segment of code below, I'm looping through
an ADO recordset looking for match on both last
and first names. If the code locates a lastname in
the recordset but fails to match the second criteria,
the first name, then I want to continue searching on
the next record in the recordset.
The code fails on the Mark = rsAddrlst.Bookmark
with an error message to the effect that bookmarks
are not supported with the current recordset.
So, how else can I successfully resume searching
on the next record?
Thanks,
Bill
====================================
strTemp = "Lastname = " & Chr(39) & LName & Chr(39)
rsAddrlst.Find strTemp, 0, adSearchForward, 1 'first search
Do While Not rsAddrlst.EOF
Mark = rsAddrlst.Bookmark
If rsAddrlst![LastName] = LName And rsAddrlst![FirstName] = FName
Then
'We've found our "Hornet"
InRec = InRec & "; " & rsAddrlst![EmailHome] 'Append
correction
Exit Do
End If
rsAddrlst.Find strTemp, 1, adSearchForward, Mark
Loop
====================================
an ADO recordset looking for match on both last
and first names. If the code locates a lastname in
the recordset but fails to match the second criteria,
the first name, then I want to continue searching on
the next record in the recordset.
The code fails on the Mark = rsAddrlst.Bookmark
with an error message to the effect that bookmarks
are not supported with the current recordset.
So, how else can I successfully resume searching
on the next record?
Thanks,
Bill
====================================
strTemp = "Lastname = " & Chr(39) & LName & Chr(39)
rsAddrlst.Find strTemp, 0, adSearchForward, 1 'first search
Do While Not rsAddrlst.EOF
Mark = rsAddrlst.Bookmark
If rsAddrlst![LastName] = LName And rsAddrlst![FirstName] = FName
Then
'We've found our "Hornet"
InRec = InRec & "; " & rsAddrlst![EmailHome] 'Append
correction
Exit Do
End If
rsAddrlst.Find strTemp, 1, adSearchForward, Mark
Loop
====================================