Bookmarking finding a string

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to find the first record and next record without using the Access
menu bar binocular control command button ie(The Find in Field) button. I
wanted to be able to use just part of the string. I was trying something
like:

Me.RecordsetClone.FindFirst "[Category] Like '*" & [Forms]![Bud]![Text17] &
"*'"
Me.Bookmark = Me.RecordsetClone.Bookmark

But this did not take me to the first item that I know exists and should
match.

How do I do this for finding a string within the entire field and go to that
record in the continuous form by coding it myself and not using the access
find?

Thanks,

Steven
 
Steven said:
I am trying to find the first record and next record without using the Access
menu bar binocular control command button ie(The Find in Field) button. I
wanted to be able to use just part of the string. I was trying something
like:

Me.RecordsetClone.FindFirst "[Category] Like '*" & [Forms]![Bud]![Text17] &
"*'"
Me.Bookmark = Me.RecordsetClone.Bookmark

But this did not take me to the first item that I know exists and should
match.

How do I do this for finding a string within the entire field and go to that
record in the continuous form by coding it myself and not using the access
find?


FindFirst should do what you want, but you should check
NoMatch to make sure a record was found. Just in case the
search text contains a ', I would use " because it's less
likely to occur in a data field:

With Me.RecordsetClone
.FindFirst "[Category] Like ""*" & Me.Text17 & "*"""
If .NoMatch Then
Beep
Else
Me.Bookmark = .Bookmark
End If
End With
 
Back
Top