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 %.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top