this is the code when i press refresh in the form 1
Code:Sub LoadEntries() LsVw.ListItems.Clear TxtFind.Text = "" FrmCusts.MousePointer = vbHourglass Set RS = CN.Execute("SELECT * FROM Customers ORDER BY FullName ") TxtFind.Enabled = False TlBar.Enabled = False While Not RS.EOF Set Itm = LsVw.ListItems.Add(, , RS!FullName, , "cust") Itm.Tag = RS!ID Itm.Bold = True Itm.SubItems(1) = RS!Address Itm.SubItems(2) = Format(RS!DateBirth, "dd/mm/yyyy") Itm.SubItems(3) = RS!Facebook Itm.SubItems(4) = RS!Email Itm.SubItems(5) = RS!Phone Itm.SubItems(6) = RS!Cellular Itm.SubItems(7) = RS!HairColour Itm.SubItems(8) = RS!Oxygen RS.MoveNext DoEvents Wend FrmCusts.MousePointer = vbNormal TxtFind.Enabled = True TlBar.Enabled = True End Sub




Reply With Quote