ALuce or anyone,
This uses a textbox to hold an embedded string that I wish to search for in the form's bound record source.
Dim rs As DAO.Recordset, okay As Boolean
If IsNull(Me.Text22) Then
MsgBox "You input a NULL string."
Exit Sub
End If
okay = False
Set rs = Me.RecordsetClone
If rs.EOF And rs.BOF Then
MsgBox "No Records in the 'DESC' database."
rs.Close
Set rs = Nothing
Exit Sub
End If
rs.MoveLast
rs.MoveFirst
Do While Not rs.EOF
If InStr(rs![DESCR], Me.Text22) > 0 Then
okay = True
Exit Do
End If
rs.MoveNext
Loop
If okay Then
Me.Bookmark = rs.Bookmark
Else
MsgBox "I did not find your string in any 'Decsription.'"
End If
Me.Text22 = ""
rs.Close
Set rs = Nothing
Rollie E