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

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

قام بنشر

السلام عليكم 

 

احتاج الى طريقة تجعل الكود يعمل في كل صفحة من صفحات التقرير على حده 

 

قام بنشر

 

التقرير هو عبارة عن صفحة لكل موظف يوجد فيها تقييمه السنوي

يوجد على الصفحة 5 مربعات اختيار (ممتاز ,جيد جدا , جيدا , مقبول , ضعيف 

وبناء على التقدير يقوم التقرير باختيار المربع المناسب

 

لكنه لا يعمل الا على الصفحة الاولى 

 

احتاج كود لتمرير هذا الامر لكل صفحة بشكل منفصل

Private Sub Report_Load()
    Me.Degree1.SetFocus
Me.TXTEDARI = DLookup("EMP_NAME", "AllEmpInfTbl", "job_title='رئيس القسم الإداري'")

If Me.Degree1 = "ممتاز" Then
Me.CK1.Value = True
Me.CK2.Value = False
Me.CK3.Value = False
Me.CK4.Value = False
Me.CK5.Value = False
ElseIf Me.Degree1 = "جيد جدا" Then
Me.CK1.Value = False
Me.CK2.Value = True
Me.CK3.Value = False
Me.CK4.Value = False
Me.CK5.Value = False
ElseIf Me.Degree1 = "جيد" Then
Me.CK1.Value = False
Me.CK2.Value = False
Me.CK3.Value = True
Me.CK4.Value = False
Me.CK5.Value = False
ElseIf Me.Degree1 = "مقبول" Then
Me.CK1.Value = False
Me.CK2.Value = False
Me.CK3.Value = False
Me.CK4.Value = True
Me.CK5.Value = False
ElseIf Me.Degree1 = "ضعيف" Then
Me.CK1.Value = False
Me.CK2.Value = False
Me.CK3.Value = False
Me.CK4.Value = False
Me.CK5.Value = True

End If

  
End Sub

  • تمت الإجابة
قام بنشر

وعليكم السلام 🙂

 

في التقرير :

1. قبل ان تضع الكود على اي حدث ، تأكد ان تضعه في القسم الصحيح ، والكائنات موجودة عندك في هذا القسم :

image.png.f65719f16f8e8edb15065f2acb2abb30.png

.

2. الحدث الصحيح لعمل التنسيق المطلوب هو ، إما حدث "عند التنسيق" او "عند الطباعة" ،

عليه ، يصبح كودك هكذا :

Private Sub Detail_Format(Cancel As Integer, FormatCount As Integer)
'    Me.Degree1.SetFocus
'Me.TXTEDARI = DLookup("EMP_NAME", "AllEmpInfTbl", "job_title='رئيس القسم الإداري'")

        Me.CK1.Value = False
        Me.CK2.Value = False
        Me.CK3.Value = False
        Me.CK4.Value = False
        Me.CK5.Value = False
        
    If Me.Degree1 = "ممتاز" Then
        Me.CK1.Value = True
    ElseIf Me.Degree1 = "جيد جدا" Then
        Me.CK2.Value = True
    ElseIf Me.Degree1 = "جيد" Then
        Me.CK3.Value = True
    ElseIf Me.Degree1 = "مقبول" Then
        Me.CK4.Value = True
    ElseIf Me.Degree1 = "ضعيف" Then
        Me.CK5.Value = True
    End If
    
End Sub

 

جعفر

  • Like 1
قام بنشر

شكرا اخ جعفر

قمت بتجريبها مسبقا 

تنجح ولكن تحتاج للنقر على كل صفحة ليتم تفعيل النتيجه

وانا احتاج ان تظهر النتائج صحيح بمجرد اصدار التقرير 

😀

قام بنشر

شكرا جعفر كلامك مزبوط 

تم التجريب بنجاح

كان بس سوء فهم للصوره .. اعتذر

 

وشكر لك كل الشكر على الحل😍

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