اذهب الي المحتوي
أوفيسنا
بحث مخصص من جوجل فى أوفيسنا
Custom Search

ربط نموذج فرعى باخر فرعى


إذهب إلى أفضل إجابة Solved by سامي الحداد,

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

الخبير الفاضل Eng.Qassim

خالص الشكر لحضرتك ابدعت فى اجابة نصف طلبى فى انتظار ابداعات الخبراء الافاضل لحل النصف الاخر من طلبى

رابط هذا التعليق
شارك

  • أفضل إجابة

تفضل استاذ @jo_2010 هذا بالنسبة لطلبك الثاني

Private Sub Form_MouseWheel(ByVal Page As Boolean, ByVal Count As Long)
    On Error Resume Next
    
    If Not Me.Dirty Then
        If (Count < 0) And (Me.CurrentRecord > 1) Then
            DoCmd.GoToRecord , , acPrevious
        ElseIf (Count > 0) And (Me.CurrentRecord <= Me.Recordset.RecordCount) Then
            DoCmd.GoToRecord , , acNext
        End If
        Dim parentForm As Form
        Dim labReqForm As Form
        Dim pnameValue As String
        Dim recordFound As Boolean
        
        Set parentForm = Me.Parent
        If parentForm.Controls("Lab_Patient").Form.CurrentView = 0 Then
            MsgBox "Lab_Patient subform is not open."
            Exit Sub
        End If
        
        Set labReqForm = parentForm.Controls("Lab_Sub_REQ").Form
        pnameValue = parentForm.Controls("Lab_Patient").Form.Controls("PNAME").Value
        labReqForm.Recordset.FindFirst "Pname = '" & pnameValue & "'"
        
        If Not labReqForm.Recordset.NoMatch Then
            labReqForm.Controls("Requests").BackColor = RGB(255, 0, 0)
            recordFound = True
        Else
'            MsgBox "Record not found in Lab_Sub_REQ."
            recordFound = False
        End If
    End If
End Sub

بالتوفيق

LAB_GOOD 2.rar

رابط هذا التعليق
شارك

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