Kaydırma çubuğu
#1
Merhabalar,   msj formunda kullanıcıların son msj ı görmesini docmd. gotorecord,,last ile değilde   kaydırma çubuğunu otomstik en alta nasıl getirebilirim kaynak bulamadım yardımcı olabilirmisiniz.. Bu şekilde istememin sebebi gotorecord sadece son msj ı gösteriyor..



  Alıntı
Bu mesajı beğenenler:
#2
Sn erdenferdi06
Öncelikle aşağıdaki kodu veritabanı içinde yeni bir modül oluşturup içine yapıştırın ve kaydedin.


Visual Basic
  1. Public Sub FormGotoEnd(F As Form, Optional AddtlEmptyRowsBottom As Long = 0)
  2. ' Accessle ilgili öğrenmek istediğiniz bilgileri https://accessapplication.blogspot.com/ adresinde bulabilirsiniz.
  3. Dim DetailSectionHeight As Long
  4. Dim nVisible As Long
  5. Dim nRecords As Long
  6.  
  7. On Error GoTo FormGotoEnd_Error
  8.  
  9. DetailSectionHeight = F.InsideHeight
  10. On Error Resume Next
  11.    If F.Section(acHeader).Visible Then
  12.        DetailSectionHeight = DetailSectionHeight - F.Section(acHeader).Height
  13.    End If
  14.        
  15.        If F.Section(acFooter).Visible Then
  16.            DetailSectionHeight = DetailSectionHeight - F.Section(acFooter).Height
  17.        End If
  18.        
  19. On Error GoTo FormGotoEnd_Error
  20.  
  21. nVisible = CLng(DetailSectionHeight / F.Section(acDetail).Height)
  22.  
  23.    If F.RecordsetClone.RecordCount > 0 Then
  24.        F.RecordsetClone.MoveLast
  25.        nRecords = F.RecordsetClone.RecordCount
  26.  
  27.        If nRecords > nVisible Then
  28.  
  29.            F.Bookmark = F.RecordsetClone.Bookmark
  30.            F.SelTop = nRecords - nVisible + 2 + AddtlEmptyRowsBottom
  31.            F.Bookmark = F.RecordsetClone.Bookmark
  32.  
  33.        End If
  34.    End If
  35.  
  36. FormGotoEnd_Exit:
  37. On Error GoTo 0
  38. Exit Sub
  39.  
  40. FormGotoEnd_Error:
  41. MsgBox "Error " & Err.Number & " (" & Err.Description & ") in FormGotoEnd", vbExclamation
  42. Resume FormGotoEnd_Exit
  43. End Sub



Daha sonra bu modülü kullanmak için hangi formda kullanacaksanız, o formun Load olayına 

Visual Basic
  1. Call FormGotoEnd(Me)



yazmanız yeterli olacaktır.
İyi çalışmalar...



  Alıntı
Bu mesajı beğenenler:
#3
çok teşekkürler hocam..



  Alıntı
Bu mesajı beğenenler:


Benzer Konular...
Konu: Yazar Cevaplar: Gösterim: Son Mesaj
access-sql-5 [FORM] Fare Kaydırma Sorunu vefa1982 1 285 26-10-2024, 18:29
Son Mesaj: dsezgin
  [FORM] metin kutusu kaydırma onkay 5 2.475 27-12-2023, 13:24
Son Mesaj: dsezgin
  Formlar Arası Kaydırma çubuklarını Senkronize Etmek sdurg 4 713 20-03-2021, 14:03
Son Mesaj: sdurg
  Araç çubuğu çoğaltma husem 4 987 27-10-2019, 22:07
Son Mesaj: husem
  [VBA] Access Pencere Gizleme (Görev Çubuğu Hariç) internally 4 1.633 09-12-2018, 22:39
Son Mesaj: internally
  [FORM] Metni sağa sola kaydırma alienerji 2 2.137 11-05-2017, 17:25
Son Mesaj: alienerji
  [FORM] kullanıcıya özel araç çubuğu husem 6 2.870 25-01-2017, 00:45
Son Mesaj: husem
  [FORM] Access kullanıcı tanımlı araç çubuğu husem 1 1.792 04-05-2016, 19:06
Son Mesaj: mengene

Foruma Git:


Bu konuyu görüntüleyen kullanıcı(lar): 1 Ziyaretçi