Advertisement
Guest User

Untitled

a guest
Aug 17th, 2017
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     'Routine to perform a quicksearch according to name
  2.    'Clear the listview first
  3.    ListView1.ListItems.Clear
  4.     flag99 = 0
  5.    
  6.     Open App.Path & "\contactfile.rnd" For Random As #1 Len = Len(contactrecord)
  7.         While Not EOF(1)
  8.             Get #1, , contactrecord
  9.             If contactrecord.ID = Text1.Text Then
  10.                     If contactrecord.ID > 999 Then
  11.                         i = i + 1
  12.                         ListView1.ListItems.Add i, , contactrecord.ID
  13.                         ListView1.ListItems(i).ListSubItems.Add , , contactrecord.Forename & contactrecord.Surname
  14.                         ListView1.ListItems(i).ListSubItems.Add , , contactrecord.Category
  15.                         'add the contact detail to listview
  16.                        flag99 = 1
  17.                     End If
  18.             End If
  19.         Wend
  20.     Close #1
  21.        
  22.     If flag99 = 0 Then
  23.         msgnomatch = MsgBox("No Records Match ", vbOKOnly, "No match")
  24.             If msgnomatch = vbOK Then
  25.                        
  26.             End If
  27.     End If
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement