Filter to match any part of creteria

bee55

Registered User.
Local time
Today, 10:02
Joined
Oct 27, 2011
Messages
50
Hi guys,

i have a text box ( Supplier_Name) on the main form i would like to filter subform by any part of entered charactor on the feild (suplier_Name)
here is my code :
Code:
Private Sub Find_Click()

    If Not IsNull(Supplier_Name) Then
       Me.Suppliers_Details.Form.Filter = "[Supplier_Name] = '" & Me.Supplier_Name & "'"

       .FilterOn = True
        Exit Sub
    End If
    
     
End Sub

this code is work fine but i have to enter all the charactors of long name , but i would like to only insert few chars.

your reply will be highly appriciated

great thanks,
 
Last edited:
You need to use Like and wild cards, I think the syntax is


Me.Suppliers_Details.Form.Filter = "[Supplier_Name] Like '*'' & Me.Supplier_Name & ''*'"


Brian
 
You need to use Like and wild cards, I think the syntax is


Me.Suppliers_Details.Form.Filter = "[Supplier_Name] Like '*'' & Me.Supplier_Name & ''*'"


Brian

it is give me a null value even if i enter a full chars
 

Users who are viewing this thread

Back
Top Bottom