AccessTr.neT
sorgulama çalışmıyor - Baskı Önizleme

+- AccessTr.neT (https://accesstr.net)
+-- Forum: Microsoft Excel (https://accesstr.net/forum-microsoft-excel.html)
+--- Forum: Excel Cevaplanmış Soruları (https://accesstr.net/forum-excel-cevaplanmis-sorulari.html)
+--- Konu Başlığı: sorgulama çalışmıyor (/konu-sorgulama-calismiyor.html)



sorgulama çalışmıyor - sc.zumrut - 10/02/2011

Private Sub CommandButton1_Click()
Dim bak As Range
Dim say As Integer
For Each bak In Range("A1:A" & WorksheetFunction.CountA(Range("A1:A65000")))
If bak.Value = TextBox2.Value Then
MsgBox "Bu Kayıt numarası bulundu."
Exit Sub
End If
Next bak
For Each bak In Range("L1:L" & WorksheetFunction.CountA(Range("L1:L65000")))
If StrConv(bak.Value, vbUpperCase) = StrConv(TextBox2.Value, vbUpperCase) Then
MsgBox "Bu isimde bir kaydınız bulundu"
Exit Sub
End If
Next bak

say = WorksheetFunction.CountA(Range("B1:B65000"))
TextBox1.Value = say

Cells(say + 1, 1).Value = TextBox1.Value
Cells(say + 1, 2).Value = TextBox2.Value
Cells(say + 1, 3).Value = TextBox3.Value
Cells(say + 1, 4).Value = TextBox4.Value
Cells(say + 1, 5).Value = TextBox5.Value
Cells(say + 1, 6).Value = TextBox6.Value
Cells(say + 1, 7).Value = TextBox7.Value
Cells(say + 1, 8).Value = TextBox8.Value
Cells(say + 1, 9).Value = TextBox9.Value
Cells(say + 1, 10).Value = TextBox10.Value
Cells(say + 1, 11).Value = TextBox11.Value
Cells(say + 1, 12).Value = TextBox12.Value
Cells(say + 1, 13).Value = TextBox13.Value
Cells(say + 1, 14).Value = TextBox14.Value
Cells(say + 1, 15).Value = TextBox15.Value
Cells(say + 1, 16).Value = TextBox16.Value
Cells(say + 1, 17).Value = TextBox17.Value
Cells(say + 1, 18).Value = TextBox18.Value
Cells(say + 1, 19).Value = TextBox19.Value


Workbooks("bölge el defteri.XLS").Save
MsgBox "Verileriniz Kaydedildi", , "KAYIT"
CommandButton4_Click

TextBox1.Value = WorksheetFunction.Count(Range("A1:A65000")) + 1
End Sub

Private Sub CommandButton2_Click()
Dim bak As Range
For Each bak In Range("L1:L" & WorksheetFunction.CountA(Range("L1:L65000")))
If StrConv(bak.Value, vbUpperCase) = StrConv(TextBox2.Value, vbUpperCase) Then
bak.Select
TextBox1.Value = ActiveCell.Offset(0, -2).Value
TextBox3.Value = ActiveCell.Offset(0, -1).Value
TextBox4.Value = ActiveCell.Offset(0, -7).Value
TextBox5.Value = ActiveCell.Offset(0, -6).Value
TextBox6.Value = ActiveCell.Offset(0, 34).Value
TextBox7.Value = ActiveCell.Offset(0, 36).Value
TextBox8.Value = ActiveCell.Offset(0, 39).Value
TextBox9.Value = ActiveCell.Offset(0, 41).Value
TextBox10.Value = ActiveCell.Offset(0, 43).Value
TextBox11.Value = ActiveCell.Offset(0, 44).Value
TextBox12.Value = ActiveCell.Offset(0, 32).Value
TextBox13.Value = ActiveCell.Offset(0, -5).Value
TextBox14.Value = ActiveCell.Offset(0, 28).Value
TextBox15.Value = ActiveCell.Offset(0, 27).Value
TextBox16.Value = ActiveCell.Offset(0, 46).Value
TextBox17.Value = ActiveCell.Offset(0, 6).Value
TextBox18.Value = ActiveCell.Offset(0, 10).Value
TextBox19.Value = ActiveCell.Offset(0, 23).Value


Exit Sub
End If
Next bak
MsgBox "Aradığınız isimde bir kayıt bulunamadı"
End Sub

Private Sub CommandButton3_Click()
Dim bos As Range
For Each bos In Range("B2:B" & WorksheetFunction.CountA(Range("B2:B65000")))
If TextBox2.Value = "" Or bos = "" Or ActiveCell = "" Then
MsgBox "Önce aradığınız veriyi BUL ile bulmalısınız"
Exit Sub
End If
Next bos
If TextBox1 = "" Or TextBox2 = "" Or TextBox3 = "" Or TextBox4 = "" Or TextBox5 = "" Or TextBox6 = "" Or TextBox7 = "" Or TextBox8 = "" Or TextBox9 = "" Or TextBox10 = "" Or TextBox11 = "" Or TextBox12 = "" Then
MsgBox "t.c no listesinden bir Kişi seçmelisiniz"
Else
ActiveCell = TextBox2
ActiveCell.Offset(0, 1) = TextBox3
ActiveCell.Offset(0, 2) = TextBox4
ActiveCell.Offset(0, 3) = TextBox5
ActiveCell.Offset(0, 4) = TextBox6
ActiveCell.Offset(0, 5) = TextBox7
ActiveCell.Offset(0, 6) = TextBox8
ActiveCell.Offset(0, 7) = TextBox9
ActiveCell.Offset(0, 8) = TextBox10
ActiveCell.Offset(0, 9) = TextBox11
ActiveCell.Offset(0, 10) = TextBox12
ActiveCell.Offset(0, 11) = TextBox13
ActiveCell.Offset(0, 12) = TextBox14
ActiveCell.Offset(0, 13) = TextBox15
ActiveCell.Offset(0, 14) = TextBox16
ActiveCell.Offset(0, 15) = TextBox17
ActiveCell.Offset(0, 16) = TextBox18
ActiveCell.Offset(0, 17) = TextBox19
End Sub







Private Sub CommandButton4_Click()
TextBox1.Value = ""
TextBox2.Value = ""
TextBox3.Value = ""
TextBox4.Value = ""
TextBox5.Value = ""
TextBox6.Value = ""
TextBox7.Value = ""
TextBox8.Value = ""
TextBox9.Value = ""
TextBox10.Value = ""
TextBox11.Value = ""
TextBox12.Value = ""
TextBox13.Value = ""
TextBox14.Value = ""
TextBox15.Value = ""
TextBox16.Value = ""
TextBox17.Value = ""
TextBox18.Value = ""
TextBox19.Value = ""



TextBox2.SetFocus
End Sub



Private Sub CommandButton7_Click()
Unload UserForm6
UserForm1.Show
End Sub

yukarıdaki koda göre sorgulama yapıyorum 6500. satırdaki bilgileri sorgulamada bulamıyorum. (sorgu sonucu olarak aradığınız kayıt bulunamadı ) olarak uyarı geliyor


Cvp: sorgulama çalışmıyor - sansar55 - 10/02/2011

sn zumrut bu şekilde yardımcı olamayız örnek eklerseniz. daha kolay ve hızlı olur ki bu kod ların sorgu ile alakası yok


Cvp: sorgulama çalışmıyor - ercansahin - 11/02/2011

sn zumrut; sansar55 dostumuzunda beliirttiği üzere, bu şekilde cevap almanız imkansıza yakın bir olasılık, bu nedenle lütfen ilgili örneği ekleyiniz ve sorunuzu bu örnek üzerinden hareketle iletiniz.


Cvp: sorgulama çalışmıyor - Puletin - 14/02/2011

Konu Excel Soruları ve Cevapları bölümüne taşınmıştır


Cvp: sorgulama çalışmıyor - ogulcan92 - 22/02/2011

Sn:sc.zumrut
A sütünü ve L sütününu Textbox2 sorgulama yapıyorsunuz kodları tekrar kontrol ediniz ve hazırlamış olduğunuz örneği eklerseniz üzerinde düzeltilerek yardımcı olabiliriz aksi takdirde herkes için örnek hazırlamak çok zor.