How can I take account of a part of a selection?

sofie

Registered User.
Local time
Today, 16:06
Joined
Jan 17, 2002
Messages
12
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?
 
"*" & [Parameter] & "*"

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

Users who are viewing this thread

Back
Top Bottom