hi guys i need your help!
i have two date picker and a vsflexgrid in my form then i select
datepicker1 month of january
datepicker2 month of february
i want to display all the records in both month ...
example:
january 9 records
febraury 10 records
my sample code:
For i = 0 To IntDiff
sDate = DateAdd("m", i, sdate1)
DateArray(i) = Format$(sDate, "MMM YYYY")
Me.vslistwork.Rows = Me.vslistwork.Rows + 1
Me.vslistwork.TextMatrix(Me.vslistwork.Rows - 1, 0) = DateArray(i)
Do Until rsp.EOF
mdate = Format(rsp!TDATE, "MMM YYYY")
' MsgBox "" & mdate
If DateArray(i) = mdate Then
d = rsp!peso
e = rsp!dollar
If e > 0 Then
g = g + 1
Me.vslistwork.TextMatrix(Me.vslistwork.Rows - 1, 1) = g
End If
If d > 0 Then
f = f + 1
Me.vslistwork.TextMatrix(Me.vslistwork.Rows - 1, 3) = f
End If
Me.vslistwork.TextMatrix(Me.vslistwork.Rows - 1, 1) = g
Me.vslistwork.TextMatrix(Me.vslistwork.Rows - 1, 3) = f
End If
'Me.vslistwork.Rows = Me.vslistwork.Rows + 1
rsp.MoveNext
Loop
my problem is only the month of january will appear as 9 records then february is no records he cant count the records of february
help!...