-
- Destek
-
-
Özel Arama
![]() |
Private Sub TextBox203_Change()
On Error Resume Next
ListBox2.ColumnCount = 16 ' lisbox'ta ki sütun sayısı
ListBox2.ColumnWidths = "40;40;120;40;40;50;40;120;70;70;60;30;90;30;40;70" 'lisbox'taki sütunların genişliği
ListBox2.RowSource = "İCMAL!A2:P" & Sheets("İCMAL").Range("A65536").End(xlUp).Row 'lisbox'ta gösterilecek hücre aralığı
ListBox2.ColumnHeads = True 'listboxta birinci satırı sabitler tıklanmaz
ListBox2.RowSource = ""
If OptionButton5.Value = True Then
secim = "PARTİ"
ElseIf OptionButton6.Value = True Then
secim = "İSTİF"
ElseIf OptionButton7.Value = True Then
secim = "MAL SAHİBİ"
ElseIf OptionButton8.Value = True Then
secim = "İHALE TARİHİ"
ElseIf OptionButton9.Value = True Then
secim = "YIL"
ElseIf OptionButton14.Value = True Then
secim = "KOOP/KÖYÜ"
ElseIf OptionButton15.Value = True Then
secim = "SATIŞ DURUMU"
End If
Set con = CreateObject("Adodb.connection")
Set rs = CreateObject("Adodb.recordset")
con.Open "provider=microsoft.ACE.oledb.12.0;data source=" & ThisWorkbook.FullName & _
";extended properties=""Excel 8.0;hdr=yes"""
sorgu = "Select * from [İCMAL$A1:P65536] where [" & secim & "] like '" & StrConv(TextBox203.Text, 1) & "%" & "'"
rs.Open sorgu, con, 1, 3
ListBox2.Column = rs.getrows
Dim topla As Double, toplam As Double
For i = 0 To ListBox2.ListCount - 1
topla = ListBox2.List(i, 5)
toplam = toplam + topla
Next i
TextBox229.Value = toplam
End Sub
sorgu = "Select * from [ÝCMAL$A1:P65536] where [" & secim & "] like '" & StrConv(TextBox203.Text, 1) & "%" & "'"
sorgu = "Select * from [İCMAL$A1:P65536] where [" & secim & "] like '" & TextBox203.Text & "%" & "'"
böylede deneyebilirsiniz.TextBox229.Value = toplam
yerine alttakini yapınız.TextBox229.Value = Format(toplam, "#,##0.00")
con.Open "provider=microsoft.ACE.oledb.12.0;data source=" & ThisWorkbook.FullName & _
";extended properties=""Excel 8.0;hdr=yes""
con.Open "provider=microsoft.jet.oledb.4.0;data source=" & ThisWorkbook.FullName & _
";extended properties=""Excel 8.0;hdr=yes""
feraz yazdı:Birde bunu deneyiniz.Daha olmadı klasik yöntemle yapılır veri azsa şayet.
con.Open "provider=microsoft.jet.oledb.4.0;data source=" & ThisWorkbook.FullName & _
";extended properties=""Excel 8.0;hdr=yes;Imex=1"""
sorgu = "Select [PARTÝ],[ÝSTÝF],[CÝNSÝ SINIFI VE NEVÝ],[BOYU],[ADET],[HACÝM],[STER]," & _
" [MAL SAHÝBÝ],Format([ÝHALE TARÝHÝ],'dd.mm.yyyy'),Format([SATIÞ TARÝHÝ],'dd.mm.yyyy')," & _
" [SATIÞ NO],[STOK],[YILI],[KOOP/KÖYÜ],[RAMPA],[ÖDEME DURUMU] from [ÝCMAL$] where [" & secim & "] like '" & StrConv(TextBox203.Text, 1) & "%" & "'"
Bu forumu görüntüleyenler: Kayıtlı kullanıcı yok ve 1 misafir