Skip to main content

AccessTr.neT


İstediğim Bir Alanı Otomatik Tamamla Dışında Tutmak

İstediğim Bir Alanı Otomatik Tamamla Dışında Tutmak

Çözüldü #3
Otomatik tamamlama yapılmasını istediğin metin kutularının im özelliğine 1 yaz

[Resim: do.php?img=4095]

Module1'in kodlarını aşağıdaki ile değiştir.

Option Compare Database
Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As Integer
Function otomotiktamamla(kutuadi As String)
Dim ctl As Control
Dim LenOldText As Long
Static Once As Boolean
Dim rst As Object
If Once = False Then
If GetAsyncKeyState(vbKeyBack) = 0 _
And GetAsyncKeyState(vbKeyDelete) = 0 Then
Once = True
On Error Resume Next
Set ctl = Screen.ActiveForm.ActiveControl
Set rst = Screen.ActiveForm.RecordsetClone
If ctl.Tag = "1" Then
If ctl.Text <> "" Then
rst.FindFirst kutuadi & " LIKE '" & ctl.Text & "*'"
If Not rst.NoMatch Then
LenOldText = Len(ctl.Text)
ctl.Text = rst(kutuadi)
ctl.SelStart = LenOldText
ctl.SelLength = Len(ctl.Text) - LenOldText
End If
End If
End If
Set ctl = Nothing
Set rst = Nothing
On Error GoTo 0
Once = False
End If
End If
End Function
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