View Full Version : How can I take account of a part of a selection?


sofie
01-18-2002, 12:01 AM
Hi,

I would like to know what I am doing wrong.

Private Sub cmdSearchKeyword_Click()
On Error GoTo Err_cmdSearchKeyword_click
Me.Filter = "omschrijving = [Which category are you searching for?]"
Me.FilterOn = True
Omschrijving.SetFocus
Exit_cmdSearchKeyword_click:
Exit Sub
Err_cmdSearchKeyword_click:
MsgBox Err.Description
Resume Exit_cmdSearchKeyword_click
End Sub

But I only want to typ a keyword and not the whole content, so search on a part of the content.

With the code abouve, I only search on the whole content.

What do I have to do? Who can help me?

David R
01-18-2002, 07:10 AM
"*" & [Parameter] & "*"

It looks crazy, but it works. Only use one if you want to search only at the beginning of a field, for example.