Hi,
Can somebody modify this code so that I can filter the data by "Customer Name" "Sales Person" & "City".
The following is the code:
Note: Here in this code "fname" & "lname" or the names of Option Buttons. And Text9 is the Text Box where user can enter the text to filter.
VB Code:
Private Sub Text9_Change() rs.Close If fname.Value = True Then rs.Open "Select * from dept where fname like '" & Text9 & "%'", db rs.Requery Else rs.Open "Select * from dept where lname like '" & Text9 & "%'", db rs.Requery End If If rs.RecordCount <> 0 Then show_rec Else clear_txt End If End Sub
Thanks in advance for any help.
sweetie_2005
Edit: Added [vbcode][/vbcode] tags and indenting for clarity. - Hack




Reply With Quote