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?

[This message has been edited by sofie (edited 01-18-2002).]

SteveA
01-18-2002, 12:12 AM
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 http://www.access-programmers.co.uk/ubb/smile.gif