Skip to main content

AccessTr.neT


metin text değere göre diğer textlerin güncellenmesi

metin text değere göre diğer textlerin güncellenmesi

Çözüldü #5
bu şekilde olması imkansız siz bahse konu olan metin kutularını bir alana bağlamışsınız

şayet istediğiniz işlemleri yapmak istiyorsanız mutlaka boş ve veri olarak bir tabloya bağlı olmayan form tasarlamanız gerekir form üzerinde yaptığınız bütün işlemleri kod ile yapmanız gerekir

ekte komple bir form kodu ekledim bunda ilk kayıt son kayıt sonraki kayıt önceki kayıt hepsi var sadece arama yok oda ilave edilirse form üzerindeki hangi alana bir veri girerseniz girin ara düğmesine tıkladığınızda tablonuzda o alanların olduğu verileri arar

Kod:
Option Compare Database
Public rstEmployees As ADODB.Recordset
Public intCount As Integer
Private Sub Form_Load()
    Dim strSQL As String
strSQL = "SELECT tblEmployees.strFirstName, tblEmployees.strLastName, tblEmployees.olePhoto FROM tblEmployees"
    Set rstEmployees = New ADODB.Recordset
    'rstEmployees.CursorLocation = adUseClient
    rstEmployees.Open strSQL, CurrentProject.Connection, adOpenStatic, adLockReadOnly
    With rstEmployees
        ' as this recordset supports approximate positioning then
        ' RecordCount will be the exact number of records in the Recordset
        ' regardless of whether it has been fully populated.
        intCount = .RecordCount
        .MoveFirst
        showRecord .AbsolutePosition & " of " & intCount
    End With
End Sub
Function showRecord(strRecordCount)
    With rstEmployees
       Me.fraPhoto = .Fields("olePhoto")
        Me.txtFirstName = .Fields("strFirstName")
        Me.txtLastName = .Fields("strLastName")
        Me.txtCount = strRecordCount
    End With
End Function
Private Sub cmdClose_Click()
    DoCmd.Close
End Sub
Private Sub cmdDisplayFooter_Click()
    Me.FormFooter.Visible = Not Me.FormFooter.Visible
End Sub
Private Sub cmdFirst_Click()
    With rstEmployees
        .MoveFirst
        showRecord .AbsolutePosition & " of " & intCount
    End With
End Sub
Private Sub cmdLast_Click()
    With rstEmployees
        .MoveLast
        showRecord .AbsolutePosition & " of " & intCount
    End With
End Sub
Private Sub cmdNext_Click()
    With rstEmployees
        .MoveNext
        If Not .EOF Then
            showRecord .AbsolutePosition & " of " & intCount
        Else
            .MoveLast
            showRecord "Last Record"
        End If
    End With
End Sub
Private Sub cmdPrevious_Click()
    With rstEmployees
        .MovePrevious
        If Not .BOF Then
            showRecord .AbsolutePosition & " of " & intCount
        Else
            .MoveFirst
            showRecord "First Record"
        End If
    End With
End Sub
Private Sub Form_Close()
    rstEmployees.Close
End Sub

yani formları asla bir tabloya bağlamayın anlık verileri form üzerine alın böylece ağ üzerinde çalışırken tabloyu meşgul etmeyeceğin için kişiler anında bağlanabilecek

şayet yapamazsanız ben size basit bir örnek yapar eklerim
meşhur çin atasözü  "ACCESS İLE YAPABİLECEKLERİNİZ HAYAL EDEBİLECEKLERİNİZ İLE SINIRLIDIR" siz ne kadar hayal edebiliyorsunuz
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: metin text değere göre diğer textlerin güncellenmesi - Yazar: esrefigit - 16/02/2009, 14:43
Task