Filtering ad table on a form

D

daniel

Hi every body
As new user in access, i want to filter a table on a form
in the header of this form I have a text zone and when I press the enter key
, the text is use to create a filter like


Dim strFilter As String
strFilter = Texte18.Text
strFilter = "PATIENT = '" & strFilter & "%'"
Me.Filter = strFilter
Me.FilterOn = True

But nothing appears.
Can you help me !!
 
D

Douglas J. Steele

You need to use Like, not =. As well, the wild card in Access is usually
(but not always) *, not %.
 
Top