Skip to main content

AccessTr.neT


Sorulan soru-anlami

Sorulan soru-anlami

Çözüldü #14
Form1'i tasarım görünümünde açtıktan sonra alt+f11'i e basacaksınız. Vba sayfasında aşağıdaki kodlar görünecektir.

Option Compare Database
Dim say(1000)
Dim s
Dim ka


Private Sub aranan_Change()
Me.Komut2.Visible = True
Me.Komut5.Visible = False

End Sub


Private Sub Form_Open(Cancel As Integer)

Me.Komut5.Visible = False

End Sub

Private Sub Komut2_Click()
On Error GoTo Err_Komut2_Click
DoCmd.GoToRecord , , acFirst
If Len(Me.aranan) = 0 Or IsNull(Me.aranan) Then
MsgBox "Aranan kelimeyi Giriniz"
Exit Sub
End If
s = 0
For i = 1 To Len(kitap_adi)
If UCase(Me.aranan) = UCase(Mid(kitap_adi, i, Len(Me.aranan))) Then
s = s + 1
say(s) = i
End If
Next
If s <> 0 Then GoTo 600
On Error GoTo 300
DoCmd.GoToRecord , , acNext
GoTo 400
300
MsgBox ("Bitti")
GoTo 200
400
s = 0
For i = 1 To Len(kitap_adi)
If UCase(Me.aranan) = UCase(Mid(kitap_adi, i, Len(Me.aranan))) Then
s = s + 1
say(s) = i
End If
Next
If s = 0 Then MsgBox "Aranan Kelime Bulunmadı": Exit Sub
ka = 1
If s >= 1 Then
kitap_adi.SetFocus
kitap_adi.SelStart = say(1) - 1
kitap_adi.SelLength = Len(Me.aranan)
End If
If s > 0 Then
Me.Komut2.Visible = False
Me.Komut5.Visible = True
End If
GoTo 200
600
ka = 1
If s >= 1 Then
kitap_adi.SetFocus
kitap_adi.SelStart = say(1) - 1
kitap_adi.SelLength = Len(Me.aranan)
End If
If s > 0 Then
Me.Komut2.Visible = False
Me.Komut5.Visible = True
End If
200
Exit_Komut2_Click:
Exit Sub

Err_Komut2_Click:
MsgBox "Başa Dönülüyor."
DoCmd.GoToRecord , , acFirst
Resume Exit_Komut2_Click

End Sub
Private Sub Komut5_Click()
DoCmd.GoToRecord , , acFirst
If ka >= s Then GoTo 100
ka = ka + 1
kitap_adi.SetFocus
kitap_adi.SelStart = say(ka) - 1
kitap_adi.SelLength = Len(Me.aranan)
GoTo 200
100
On Error GoTo 300
DoCmd.GoToRecord , , acNext
GoTo 400
300
MsgBox ("Bitti")
GoTo 200
400
s = 0
For i = 1 To Len(kitap_adi)
If UCase(Me.aranan) = UCase(Mid(kitap_adi, i, Len(Me.aranan))) Then
s = s + 1
say(s) = i
End If
Next
If s = 0 Then MsgBox "Aranan Kelime Bulunmadı": Exit Sub
ka = 1
If s >= 1 Then
kitap_adi.SetFocus
kitap_adi.SelStart = say(1) - 1
kitap_adi.SelLength = Len(Me.aranan)
End If
If s > 0 Then
Me.Komut2.Visible = False
Me.Komut5.Visible = True
End If
200

End Sub


Private Sub Açılan_Kutu23_AfterUpdate()
' Denetime uyan kaydı bul.
Dim rs As Object

Set rs = Me.Recordset.Clone
rs.FindFirst "[kitap_id] = " & Str(Nz(Me![Açılan Kutu23], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub

Private Sub Açılan_Kutu25_AfterUpdate()
' Denetime uyan kaydı bul.
Dim rs As Object

Set rs = Me.Recordset.Clone
rs.FindFirst "[kitap_id] = " & Str(Nz(Me![Açılan Kutu25], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub

Private Sub Liste27_AfterUpdate()
' Denetime uyan kaydı bul.
Dim rs As Object

Set rs = Me.Recordset.Clone
rs.FindFirst "[kitap_id] = " & Str(Nz(Me![Liste27], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub

Private Sub Liste29_AfterUpdate()
' Denetime uyan kaydı bul.
Dim rs As Object

Set rs = Me.Recordset.Clone
rs.FindFirst "[kitap_id] = " & Str(Nz(Me![Liste29], 0))
If Not rs.EOF Then Me.Bookmark = rs.Bookmark
End Sub

Private Sub Komut38_Click()
On Error GoTo Err_Komut38_Click

Dim stDocName As String
Dim stLinkCriteria As String

stDocName = "form1_1"
DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_Komut38_Click:
Exit Sub

Err_Komut38_Click:
MsgBox Err.Description
Resume Exit_Komut38_Click

End Sub

Ayrıca lütfen sorularınızı özel mesaj ile sormayınız.
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
Sorulan soru-anlami - Yazar: hyuga84 - 24/05/2011, 19:45
Cvp: Sorulan soru-anlami - Yazar: qroniq_wqha - 24/05/2011, 19:55
Cvp: Sorulan soru-anlami - Yazar: ercansahin - 24/05/2011, 20:50
Cvp: Sorulan soru-anlami - Yazar: hyuga84 - 24/05/2011, 20:55
Cvp: Sorulan soru-anlami - Yazar: qroniq_wqha - 24/05/2011, 20:57
Cvp: Sorulan soru-anlami - Yazar: qroniq_wqha - 24/05/2011, 21:06
Cvp: Sorulan soru-anlami - Yazar: hyuga84 - 24/05/2011, 21:29
Cvp: Sorulan soru-anlami - Yazar: ercansahin - 24/05/2011, 21:31
Cvp: Sorulan soru-anlami - Yazar: hyuga84 - 24/05/2011, 21:47
Cvp: Sorulan soru-anlami - Yazar: ercansahin - 24/05/2011, 22:27
Cvp: Sorulan soru-anlami - Yazar: hyuga84 - 24/05/2011, 22:30
Cvp: Sorulan soru-anlami - Yazar: ercansahin - 24/05/2011, 22:34
Cvp: Sorulan soru-anlami - Yazar: hyuga84 - 24/05/2011, 22:40
Cvp: Sorulan soru-anlami - Yazar: ozanakkaya - 25/05/2011, 17:01
Task