hey
i have a listview with dates
i created anoter form with datepicker and i need to choose the date and its sorts
the listview by the date i pick.
for some reason it dosnt sort nothing just looping each time i pick a date.
what am i missing?
:confused:
i have a listview with dates
i created anoter form with datepicker and i need to choose the date and its sorts
the listview by the date i pick.
for some reason it dosnt sort nothing just looping each time i pick a date.
Code:
Option Explicit
Private Const mstrDateFormat As String = "dd-mm-yyyy"
Private Sub DTPicker1_CloseUp()
Dim lvi As ListItem
Dim j As Long
Dim d As Date
d = Format$(DTPicker1.Value, mstrDateFormat)
For j = FrmSecurityreport.LsVw.ListItems.Count To 1 Step -1
Set lvi = FrmSecurityreport.LsVw.ListItems(j)
If lvi.SubItems(1) <> d Then
FrmSecurityreport.LsVw.ListItems.Remove (j)
End If
Next
Unload Me
Call FrmSecurityreport.FillList
End Sub
:confused: