Hi jose... Welcome to the forums...

One way is to query the database for selecting records which have the brgy code lesser than the one being searched. Then, display the records in a ListView control.

Second way is to loop through all the items in the first listview(which will be filled with the entire data) and add the low valued brgy code items to the second listview control.

Example:
vb Code:
  1. Option Explicit
  2.  
  3. Private Sub Command1_Click()
  4.     Dim i           As Long
  5.     Dim lngSearch   As Long
  6.     Dim lvwItem     As ListItem
  7.        
  8.     lngSearch = CLng(Text1.Text)    '~~~ Number to be searched
  9.    
  10.     For i = 1 To ListView1.ListItems.Count  '~~~ Loop through each item in the first ListView
  11.         If CLng(ListView1.ListItems(i).Text) < lngSearch Then   '~~~ Check if the item is lesser than the number to be searched
  12.             Set lvwItem = ListView2.ListItems.Add(, , ListView1.ListItems(i).Text)  '~~~ If so, add the contents to the second listview
  13.             lvwItem.SubItems(1) = ListView1.ListItems(i).SubItems(1)
  14.             lvwItem.SubItems(2) = ListView1.ListItems(i).SubItems(2)
  15.             lvwItem.SubItems(3) = ListView1.ListItems(i).SubItems(3)
  16.             lvwItem.SubItems(4) = ListView1.ListItems(i).SubItems(4)
  17.             lvwItem.SubItems(5) = ListView1.ListItems(i).SubItems(5)
  18.             Set lvwItem = Nothing
  19.         End If
  20.     Next
  21. End Sub