Hello =) i'm Mark from Philippines
My program has a 6 field names via Access Database
Problem: I wanted to have a Search box which can search 2 field name data. My current code has the ability to search for only 1 field.
Hope you guys the best =)
My program has a 6 field names via Access Database
Problem: I wanted to have a Search box which can search 2 field name data. My current code has the ability to search for only 1 field.
Private Sub Form_Load() Code:
Me.Top = (Screen.Height - Me.Height) / 2 Me.Left = (Screen.Width - Me.Width) / 2 Listview.LabelEdit = lvwManual Listview.FullRowSelect = True Listview.GridLines = True Listview.View = lvwReport cboCategory.Clear cboCategory.AddItem "ID Owner" cboCategory.AddItem "All" cboCategory.ListIndex = 0 Call RefreshListview End Sub
Private Sub cmdSearch_Click() Code:
On Error GoTo errorsearch If cboCategory.ListIndex = 0 Then FindRecordset "Select * From Finder" Call refreshDataSearch Else FindRecordset "Select * From Finder Where Owner like '%" & txtSearch.Text & "%';" Call refreshDataSearch End If Exit Sub: errorsearch: MsgBox Error.Description, vbCritical, "Error" Set FindCon = Nothing Set FindRs = Nothing End End Sub
Hope you guys the best =)