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

sofie

Registered User.
Local time
Today, 16:09
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?

[This message has been edited by sofie (edited 01-18-2002).]
 
The following should be okay:


Change from:
Me.Filter = "omschrijving = [Which category are you searching for?]"

Change to:
Me.Filter = "omschrijving Like '*' & [Which category are you searching for?] & '*'"

I haven't tried it out, so please let me know if it doesn't work.

Cheers,
SteveA
smile.gif
 

Users who are viewing this thread

Back
Top Bottom