selamın aleykum arkadaşlar,
listview tarihe gore listeleme yapmak istiyorum
buna gore hic bir yerde kaynak ve yardım edecek kimse bulamadım
ornek ekleyecektim ama burda ekleme yeri yok heralde şimdi bu koda gore nasıl yapmalıyımki tarihlere gore kayıt cağırsın unutmadan bu şekilde tek tarihe gore kayıt gosteriyor yardımlarınız icin şimdiden teşekkurler.
kod:
Dim Prod As New ADODB.Recordset
Dim ls As ListItem
Dim adoCategory As New ADODB.Recordset
Private Sub Form_Load()
If Prod.State = 1 Then Set Prod = Nothing
Prod.CursorLocation = adUseClient
Prod.Open "SELECT * FROM [Sorgu1] ORDER BY [tarih]", con, adOpenDynamic, adLockOptimistic
Prod.Requery
dpProd
End Sub
Private Sub txtSearch_Change()
If Prod.State = 1 Then Set Prod = Nothing
calther = "SELECT * from [tbl_stok_cıkısı] where [tarih] like '%" & Trim(txtSearch) & "%'"
Prod.Open calther, con, adOpenKeyset, adLockOptimistic
Lv.ListItems.Clear
dpProd
End Sub
Function dpProd()
Do While Not Prod.EOF
'Set ls = Lv.ListItems.Add(, , Prod.Fields(0))
Set ls = Lv.ListItems.Add(, , Prod.Fields(1))
ls.SubItems(1) = Prod.Fields(0)
ls.SubItems(2) = Prod.Fields(1)
ls.SubItems(3) = Prod.Fields(2)
ls.SubItems(4) = Prod.Fields(3)
ls.SubItems(5) = Prod.Fields(4)
ls.SubItems(6) = Prod.Fields(5)
ls.SubItems(7) = Prod.Fields(6)
ls.SubItems(8) = Prod.Fields(7)
ls.SubItems(9) = Prod.Fields(8)
'--------------------------------------------------------------------------------------
ls.SubItems(7) = Format(ls.SubItems(7), "#,#0.00")
ls.SubItems(8) = Format(ls.SubItems(8), "#,#0.00")
'ls.SubItems(8) = Prod.Fields(8)
'ls.SubItems(3) = Format(Prod.Fields(3), "#,#0.00")
Prod.MoveNext
Loop
'lblcount.Caption = Str(Prod.RecordCount) + " record(s) found"
Set Prod = Nothing
End Function
__________________
listview tarihe gore listeleme
Programlama0 Mesaj
●44 Görüntüleme
- ReadBull.net
- Programlama ve Yazılım
- Programlama
- listview tarihe gore listeleme