smtazulislam
Member
- Local time
- Today, 20:57
- Joined
- Mar 27, 2020
- Messages
- 806
Hi, I have a searcher form. It is worked.
But now like to put multiple value to search.
CODE :
I try to follow this link
How can do that ?
Any help will be appreciate.
But now like to put multiple value to search.
CODE :
Code:
Private Sub cmdFilter_Click()
Dim strWhere As String
Dim lngLen As Long
If Not IsNull(Me.fltCompanyName) Then
strWhere = strWhere & "([CompanyName] = """ & Me.fltCompanyName & """) AND "
End If
'Another text field example. Use Like to find anywhere in the field.
If Not IsNull(Me.fltBranch) Then
strWhere = strWhere & "([BranchEn] Like ""*" & Me.fltBranch & "*"") AND "
End If
'Another text field example. Use Like to find anywhere in the field.
If Not IsNull(Me.fltCategory) Then
strWhere = strWhere & "([Category] Like ""*" & Me.fltCategory & "*"") AND "
End If
lngLen = Len(strWhere) - 5
If lngLen <= 0 Then
MsgBox "No criteria", vbInformation, "Nothing to do."
Else
strWhere = Left$(strWhere, lngLen)
Debug.Print strWhere
Me.Filter = strWhere
Me.FilterOn = True
End If
End Sub
I try to follow this link
How can do that ?
Any help will be appreciate.