اذهب الي المحتوي
أوفيسنا

الردود الموصى بها

قام بنشر (معدل)

السلام عليكم

عندي سؤال اخوتي في الله طريقة ربط التقارير في TreeView

الكود المرفق هو لفتح الفورم فقط هل من الممكن التعديل عليه بحيث يفتح تقارير وفورم 

Private Sub Form_Load()
    Dim OldLong As Long
    Dim nodX As Node
    Set nodX = TreeView1.Nodes.ADD(, , "R", "ÃÚÏÇÏÇÊ ÇáäÙÇã", 3)
    Set nodX = TreeView1.Nodes.ADD(, , "D", "ÇáÊÞÇÑíÑ", 3)
    Set nodX = TreeView1.Nodes.ADD("R", tvwChild, "C1", "ÈíÇäÇÊ ÇáÔÑßÉ", 2)
    Set nodX = TreeView1.Nodes.ADD("R", tvwChild, "C2", "ÈíÇäÇÊ ãÓÊÎÏãí ÇáäÙÇã", 5)
    Set nodX = TreeView1.Nodes.ADD("R", tvwChild, "C3", "ßáãÇÊ ÇáãÑæÑ", 1)
    Set nodX = TreeView1.Nodes.ADD("R", tvwChild, "C4", "ÈíÇäÇÊ ÇáãØæÑíä", 4)
    Set nodX = TreeView1.Nodes.ADD("D", tvwChild, "C5", "ÊÞÑíÑ 1", 4)
    Set nodX = TreeView1.Nodes.ADD("D", tvwChild, "C6", "ÊÞÑíÑ 2", 4)
    nodX.EnsureVisible
    OldLong = GetWindowLong(TreeView1.hwnd, GWL_EXSTYLE)
    SetWindowLong TreeView1.hwnd, GWL_EXSTYLE, OldLong Or WS_EX_LAYOUTRTL
    InvalidateRect hwnd, 0, False
    
End Sub
Private Sub TreeView1_Click()
   
    Dim strFormName As String
    Dim formsDictionary As New Scripting.Dictionary
    formsDictionary.ADD "ÈíÇäÇÊ ÇáÔÑßÉ", "frmCompany"
    formsDictionary.ADD "ÈíÇäÇÊ ãÓÊÎÏãí ÇáäÙÇã", "frmSystemUserData"
    formsDictionary.ADD "ßáãÇÊ ÇáãÑæÑ", "frmPassword"
    formsDictionary.ADD "ÈíÇäÇÊ ÇáãØæÑíä", "frmDeveloper"
    strFormName = TreeView1.SelectedItem.Text
    If formsDictionary.Exists(strFormName) Then
        DoCmd.OpenForm formsDictionary(strFormName)
    Else
        MsgBox "ÚÐÑÇ åÐÇ ÇáäãæÐÌ ÛíÑ ãæÌæÏ", vbExclamation, "ÊäÈíå"
    End If
End Sub

 

 

 

Soft.png

MediaSoft.rar

تم تعديل بواسطه Tamer Murad

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

زائر
اضف رد علي هذا الموضوع....

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • تصفح هذا الموضوع مؤخراً   0 اعضاء متواجدين الان

    • لايوجد اعضاء مسجلون يتصفحون هذه الصفحه
×
×
  • اضف...

Important Information