Highlight Search Result

P

Peter

I use below code to conduct a Wildcard search targeted to a specific field
with a lot of data. How do I “highlight†the search result that corresponds
to the search criteria in [apples] lets say I only use the letter r to find
all red apples but also all ripe apples…?
i.e.. i don’t want the whole field to me.focus…only the actual hits..

Thanks!


Private Sub OpenIPFormFromMenu_Click()
On Error GoTo Err_OpenIPFormFromMenu_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "Fruits"

stLinkCriteria = "[Apples]Like'*" & Me![Apples] & "*'"
DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_OpenIPFormFromMenu_Click:
Exit Sub

Err_OpenIPFormFromMenu_Click:
MsgBox Err.Description
Resume Exit_OpenIPFormFromMenu_Click

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top