hello =) again i need your help. my other thread are still waiting for replies,
hope this thread will be able to fix the another issue.
this is just another like Inventory system. the main purpose why i create a program
like this is for the printing of employees id cards and list their id numbers together
with the name of the id holder. it has it has 5 forms, 3 forms are the main namely;
Main, Add and Edit. the Main form is just a simple Listview and a Searchbox.
Issue: i want a search-box that auto click the searched data. so that
i dont need to waste 2 seconds to click the searched data anymore. auto click searched
will save the 2 seconds of my time.
the current code for the searchbox is just simply search and i clicked the searched
data just to edit or remove it.
thank you soo much =)
hope this thread will be able to fix the another issue.
this is just another like Inventory system. the main purpose why i create a program
like this is for the printing of employees id cards and list their id numbers together
with the name of the id holder. it has it has 5 forms, 3 forms are the main namely;
Main, Add and Edit. the Main form is just a simple Listview and a Searchbox.
Issue: i want a search-box that auto click the searched data. so that
i dont need to waste 2 seconds to click the searched data anymore. auto click searched
will save the 2 seconds of my time.
the current code for the searchbox is just simply search and i clicked the searched
data just to edit or remove it.
Issue Code:
Private Sub cmdRefresh_Click() Call RefreshListview lblSearch = Listview.ListItems.Count End Sub Private Sub Form_Load() 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 "All" cboCategory.ListIndex = 0 Call RefreshListview lblSearch = Listview.ListItems.Count End Sub Private Sub refreshDataSearch() Dim Itmx As ListItem EmployeeMain.Listview.ListItems.Clear While Not FindRs.EOF = True Set Itmx = EmployeeMain.Listview.ListItems.Add(, , FindRs.Fields("Owner")) Itmx.SubItems(1) = FindRs.Fields("IDNumber") Itmx.SubItems(2) = FindRs.Fields("Status") Itmx.SubItems(3) = FindRs.Fields("Department") Itmx.SubItems(4) = FindRs.Fields("Acquired") Itmx.SubItems(5) = FindRs.Fields("Released") FindRs.MoveNext Wend End Sub Private Sub txtSearch_KeyPress(KeyAscii As Integer) KeyAscii = Asc(UCase(Chr(KeyAscii))) Call cmdSearch_Click End Sub Private Sub cmdSearch_Click() If cboCategory.ListIndex = 0 Then FindRecordset "Select * From Finder Where Owner like '%" & txtSearch.Text & "%' or IDNumber like '%" & txtSearch.Text & "%' or Acquired like '%" & txtSearch.Text & "%';" Call refreshDataSearch lblSearch = Listview.ListItems.Count End If Exit Sub: Set FindCon = Nothing Set FindRs = Nothing End End Sub Private Sub Listview_Click() On Error GoTo errorlistview lblMonitor = Listview.SelectedItem.Text Exit Sub: errorlistview: MsgBox "No I.D. to select!", vbExclamation, "Status" End Sub
thank you soo much =)