Skip to main content

AccessTr.neT


Excel İle Access' Sorgulama Yaparken Büyük/küçük Harf Sorunu

salvationkemal
salvationkemal
12
1692

Excel İle Access' Sorgulama Yaparken Büyük/küçük Harf Sorunu

#2
Yalnızca sorgulama Sub VeriAl () ise
Sub Verial()
Dim i As Integer, sorgu As String
Call baglanti
Range("a16:L65535").ClearContents
Set rs = CreateObject("adodb.recordset")
With Sheets("sayfa1")
k1 = Range("C1")
k2 = Range("C2")
k3 = Range("C3")
k4 = Range("C4")
k5 = Range("C5")
r1 = Range("C6")
r2 = Range("C7")
r3 = Range("C8")
r4 = Range("C9")
r5 = Range("C10")
r6 = Range("G1")
s = "select * from sil Where [YIL] AND [NO]"
If .Range("C1").Text <> "" Then s = s & " and [YIL] like  """ & k1 & """"
If .Range("C2").Text <> "" Then s = s & " and [NO] like  """ & k2 & """"
If .Range("C3").Text <> "" Then s = s & " and [DOSYAES] like  """ & k3 & """"
If .Range("C4").Text <> "" Then s = s & " and [TARİH] like  """ & k4 & """"
If .Range("C5").Text <> "" Then s = s & " and [HESAPNO] like  """ & k5 & """"
If .Range("C6").Text <> "" Then s = s & " and [ACIKLAMA] like  ""%" & r1 & "%"""
If .Range("C7").Text <> "" Then s = s & " and [TLDÖVİZ] like  """ & r2 & "%"""
If .Range("C8").Text <> "" Then s = s & " and [VADE] like  """ & r3 & """"
If .Range("C9").Text <> "" Then s = s & " and [PARA] like  """ & r4 & """"
If .Range("C10").Text <> "" Then s = s & " and [DURUM] like  ""%" & r5 & "%"""
If .Range("G1").Text <> "" Then s = s & " and [OZET] like  ""%" & r6 & "%"""
s = s & " order by [YIL],[NO]"
  rs.Open s, con, 1, 1
   Range("a16").CopyFromRecordset rs
  If WorksheetFunction.Count(Range("A16:A65000").Value) Then
  toplambulunan = WorksheetFunction.Count(Range("A16:A65000").Value)
  Range("Sayfa1!I4").Value = toplambulunan
Exit Sub
End If
  Range("A65000").End(xlUp).Offset(1, 0).Select
 End With
 End Sub

 Dosyayı ekledim.
.rar deneme.rar (Dosya Boyutu: 1,19 MB | İndirme Sayısı: 10)
Son Düzenleme: 02/10/2019, 08:54, Düzenleyen: salvationkemal.
Cevapla

Bir hesap oluşturun veya yorum yapmak için giriş yapın

Yorum yapmak için üye olmanız gerekiyor

ya da

Bu Konudaki Yorumlar
Cvp: Excel İle Access' Sorgulama Yaparken Büyük/küçük Harf Sorunu - Yazar: salvationkemal - 02/10/2019, 08:53
Task