J
jo
Could anyone help me with the following:-
I am designing a search form based on "Cool Search Tool" found via
http://www.access-programmers.co.uk/forums/showthread.php?t=120366. The
problem I have is that I need the found records to highlight the search word
in their respective field (Highlight All Instances of Found word). I would
not need the text box containing the search word to be highlighted but would
need each in my case six memo boxes to highlight each found word e.g. both
“A’s” in my code example I found on the net.
If this is not possible a control that I can click on to step through the
fields and each occurrence of the word within the field a bit like the find
control within access.
Dim SearchStr As String
SearchStr = "a"
If IsNull(Me.Text1.Value) Then
Me.Text1.Value = "this is a test example for a Cat"
Me.Text1.SetFocus
Me.Text1.SelStart = InStr(1, Me.Text1.Value, SearchStr) - 1
Me.Text1.SelLength = Len(SearchStr)
Else
Me.Text1.Value = Null
End If
Thank you for any help
I am designing a search form based on "Cool Search Tool" found via
http://www.access-programmers.co.uk/forums/showthread.php?t=120366. The
problem I have is that I need the found records to highlight the search word
in their respective field (Highlight All Instances of Found word). I would
not need the text box containing the search word to be highlighted but would
need each in my case six memo boxes to highlight each found word e.g. both
“A’s” in my code example I found on the net.
If this is not possible a control that I can click on to step through the
fields and each occurrence of the word within the field a bit like the find
control within access.
Dim SearchStr As String
SearchStr = "a"
If IsNull(Me.Text1.Value) Then
Me.Text1.Value = "this is a test example for a Cat"
Me.Text1.SetFocus
Me.Text1.SelStart = InStr(1, Me.Text1.Value, SearchStr) - 1
Me.Text1.SelLength = Len(SearchStr)
Else
Me.Text1.Value = Null
End If
Thank you for any help