Skip to main content

AccessTr.neT


bilgisayarda aktif pencere bilgisi

bilgisayarda aktif pencere bilgisi

Çözüldü #1
iyi günler
malum f4 basınca AKTİF pencere kapanıyor
bu bilgi accessde nasıl kullanılır
yani aktif penceere ismini Access de nasıl bulup gösteririz
teşekkürler
@benbendedeilem
Cevapla
Çözüldü #2
şöyle bir şey buldum ama

Create a new class module named weControlChange and paste the following code into it. Then follow the usage comments at the top of the class module to implement.
Kod:
' Usage: 1. Add the following to the declaration section of the form module:
'               Dim ControlChange As New weControlChange
'        2. Add the following to the Form_Load OR Form_Open event:
'               ControlChange.Setup Me.Form
Option Compare Database
Option Explicit

Private WithEvents weTextBox As TextBox
Private WithEvents weComboBox As ComboBox
Private WithEvents weCheckBox As CheckBox

Private CtlColl As Collection

Public Sub Setup(Frm As Form)
Dim Ctl As Control, CtlChng As weControlChange
    Set CtlColl = New Collection
    For Each Ctl In Frm.Section(acDetail).Controls
   'For Each Ctl In Frm.Controls    ''to include controls from all sections'
        Select Case Ctl.ControlType
        Case acTextBox, acComboBox, acCheckBox
            If Ctl.Enabled And Ctl.Visible Then
                Set CtlChng = New weControlChange
                Set CtlChng.Control = Ctl
                CtlColl.Add CtlChng
            End If
        End Select
    Next Ctl
End Sub

Public Property Set Control(ByVal Ctl As Control)
    Select Case Ctl.ControlType
    Case acTextBox
        Set weTextBox = Ctl
        weTextBox.OnEnter = "[Event Procedure]"
    Case acComboBox
        Set weComboBox = Ctl
        weComboBox.OnEnter = "[Event Procedure]"
    Case acCheckBox
        Set weCheckBox = Ctl
        weCheckBox.OnEnter = "[Event Procedure]"
    End Select
End Property

Private Sub weCheckBox_Enter()
    MyScript weCheckBox
End Sub

Private Sub weComboBox_Enter()
    MyScript weComboBox
End Sub

Private Sub weTextBox_Enter()
    MyScript weTextBox
End Sub

Private Sub MyScript(Ctl As Control)
    'Your code goes here
End Function

Private Sub Class_Terminate()
Dim Ctl As Object
On Error Resume Next
    If Not CtlColl Is Nothing Then
        For Each Ctl In CtlColl
            Set Ctl = Nothing
        Next Ctl
        Set CtlColl = Nothing
    End If
End Sub

@benbendedeilem
Cevapla
Çözüldü #3
msgbox me.name
açık ve bulunduğun formun adını verir. istediğin bumu?
Murat YANDEMİR ( PyramiD YAZILIM Uluslar Arası Nakliye Programları )
Bilgisayar Programcısı (1989'dan beri)

+rep Yollar biter Access bitmez. +rep
Cevapla

Bir hesap oluşturun veya yorum yapmak için giriş yapın

Yorum yapmak için üye olmanız gerekiyor

ya da
Task