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

ِAbo_El_Ela

03 عضو مميز
  • Posts

    279
  • تاريخ الانضمام

  • تاريخ اخر زياره

كل منشورات العضو ِAbo_El_Ela

  1. للاسف المديول السابق كان فيه اخطاء في السنة و الايام كان فيهم اخطاء و عدلته الي الاتي Option Compare Database Option Explicit Function DatDiffY(Vdate1 As Date, Vdate2 As Date) As Integer Dim year1 As Integer Dim year2 As Integer Dim year3 As Integer Dim month1 As Integer Dim month2 As Integer Dim month3 As Integer Dim day1 As Integer Dim day2 As Integer year1 = Int(DatePart("yyyy", Vdate1)) year2 = Int(DatePart("yyyy", Vdate2)) month1 = Int(DatePart("m", Vdate1)) month2 = Int(DatePart("m", Vdate2)) day1 = Int(DatePart("d", Vdate1)) day2 = Int(DatePart("d", Vdate2)) If month2 < month1 Or day2 < day1 Then If month2 < month1 And day2 < day1 Then If (year2 - year1) - 1 < 0 Then DatDiffY = 0 Else DatDiffY = (year2 - year1) - 1 Debug.Print DatDiffY End If End If If month2 < month1 And day2 > day1 Then If (year2 - year1) - 1 < 0 Then DatDiffY = 0 Else DatDiffY = (year2 - year1) - 1 Debug.Print DatDiffY End If End If Else DatDiffY = year2 - year1 End If End Function Function DatDiffM(Vdate1 As Date, Vdate2 As Date) As Integer Dim day1 As Integer Dim day2 As Integer Dim month1 As Integer Dim month2 As Integer Dim month3 As Integer Dim year1 As Integer Dim year2 As Integer Dim dateC1 As Date day1 = Int(DatePart("d", Vdate1)) day2 = Int(DatePart("d", Vdate2)) month1 = Int(DatePart("m", Vdate1)) month2 = Int(DatePart("m", Vdate2)) year1 = Int(DatePart("yyyy", Vdate1)) year2 = Int(DatePart("yyyy", Vdate2)) If month2 < month1 Or day2 < day1 Then If month2 < month1 And day2 >= day1 Then month3 = month2 + 12 DatDiffM = (month3 - month1) End If If month2 < month1 And day2 < day1 Then month3 = (month2 + 12) - 1 If (month3 - month1) - 1 < 0 Then DatDiffM = 0 Else DatDiffM = (month3 - month1) End If End If If month2 > month1 And day2 < day1 Then month3 = month2 - 1 DatDiffM = (month3 - month1) End If Else DatDiffM = month2 - month1 End If End Function Function DatDiffD(Vdate1 As Date, Vdate2 As Date) As Integer Dim day1 As Integer Dim day2 As Integer Dim tt As Integer Dim yy As Integer Dim month1 As Integer Dim month2 As Integer Dim month3 As Integer Dim year1 As Integer Dim year2 As Integer Dim year3 As Integer Dim dateC1 As Date day1 = Int(DatePart("d", Vdate1)) day2 = Int(DatePart("d", Vdate2)) month1 = Int(DatePart("m", Vdate1)) month2 = Int(DatePart("m", Vdate2)) year1 = Int(DatePart("yyyy", Vdate1)) year2 = Int(DatePart("yyyy", Vdate2)) If day2 < day1 Then tt = DateSerial(year1, month1 + 1, "1") - Vdate1 yy = Vdate2 - DateSerial(year2, month2, "1") DatDiffD = tt + yy Else DatDiffD = day2 - day1 End If End Function
  2. شكرا استاذي جعفر شكرا استاذي موسي شكرا استاذي روك جون
  3. عندي ملف اكسس علي شبكة داخلية علي جهازين 2 كمبيوتر علي الجهاز الاول بيعرض الصور مفيش مشكله مع العلم اني واضع ملف الصور علي الشبكة ايضا (علشان الباص بتاع الصور ميتغيرش) المشكله في الجهاز الثاني بيطلع الرساله اللي موجوده في الصوره المرفقة ( مع العلم اني عملت اعاده تحديد للصور من علي نفس الجهاز و مازالت المشكله موجوده ) فما المشكله
  4. الكود بعد التعديل Function DatDiffY(Vdate1 As Date, Vdate2 As Date) As Integer Dim year1 As Integer Dim year2 As Integer Dim year3 As Integer Dim month1 As Integer Dim month2 As Integer Dim month3 As Integer Dim day1 As Integer Dim day2 As Integer year1 = Int(DatePart("yyyy", Vdate1)) year2 = Int(DatePart("yyyy", Vdate2)) month1 = Int(DatePart("m", Vdate1)) month2 = Int(DatePart("m", Vdate2)) day1 = Int(DatePart("d", Vdate1)) day2 = Int(DatePart("d", Vdate2)) If month2 < month1 Or day2 < day1 Then If (year2 - year1) - 1 < 0 Then DatDiffY = 0 Else DatDiffY = (year2 - year1) - 1 End If Else DatDiffY = year2 - year1 End If End Function Function DatDiffM(Vdate1 As Date, Vdate2 As Date) As Integer Dim day1 As Integer Dim day2 As Integer Dim month1 As Integer Dim month2 As Integer Dim month3 As Integer Dim year1 As Integer Dim year2 As Integer Dim dateC1 As Date day1 = Int(DatePart("d", Vdate1)) day2 = Int(DatePart("d", Vdate2)) month1 = Int(DatePart("m", Vdate1)) month2 = Int(DatePart("m", Vdate2)) year1 = Int(DatePart("yyyy", Vdate1)) year2 = Int(DatePart("yyyy", Vdate2)) If month2 < month1 Or day2 < day1 Then If month2 < month1 And day2 >= day1 Then month3 = month2 + 12 DatDiffM = (month3 - month1) End If If month2 < month1 And day2 < day1 Then month3 = (month2 + 12) - 1 If (month3 - month1) - 1 < 0 Then DatDiffM = 0 Else DatDiffM = (month3 - month1) End If End If If month2 > month1 And day2 < day1 Then DatDiffM = (month2 - month1) - 1 End If Else DatDiffM = month2 - month1 End If End Function Function DatDiffD(Vdate1 As Date, Vdate2 As Date) As Integer Dim day1 As Integer Dim day2 As Integer Dim month1 As Integer Dim month2 As Integer Dim month3 As Integer Dim year1 As Integer Dim year2 As Integer Dim year3 As Integer Dim dateC1 As Date day1 = Int(DatePart("d", Vdate1)) day2 = Int(DatePart("d", Vdate2)) month1 = Int(DatePart("m", Vdate1)) month2 = Int(DatePart("m", Vdate2)) year1 = Int(DatePart("yyyy", Vdate1)) year2 = Int(DatePart("yyyy", Vdate2)) If day2 < day1 Then month3 = month2 - 1 dateC1 = DateSerial(year2, month3, day1) DatDiffD = DateDiff("d", dateC1, Vdate2) Else DatDiffD = day2 - day1 End If End Function
  5. اشكرك اخي موسي تسلم و ربنا يبارك فيك و في استاذنا جعفر
  6. عندي نموذج للاجازات بدون مرتب به اجازات الموظف في هذا النموذج قمت بعمل استعلام اجمالي بحسب نوع الاجازة (جمع السنوات - جمع الشهور - جمع الايام ) ولكن عندي مشكله ان طريقة الجمع بهذه الطريقة خاطئة حيث انة يجمع الشهور التي من الممكن ان تزيد عن 12 شهر و كذلك الايام التي من الممكن ان تزيد عن 30 يوم فكيف لي ان اجعل هذا الاستعلام يجمع بالطريقة الصحيحة اي ان الشهور ان وصلت الي 12 شهر يتم زيادة السنين بسنة و يتم تصفير الشهور و كذلك الحال للايام ان ذادت عن 30 يوم فيتم زيادة الشهور و تصفير الايام
  7. لقد قمت بعمل مديول لحساب الفرق بين تاريخين بالسنة و الشهر و الايام السنة في خانة الشهور في خانة الايام في خانة و قمت بالتجربة و ان شاء الله ناجحة و اليكم محتويات المديول للتجربة و كتابة الملاحظات لتعم الفائدة Function DatDiffY(Vdate1 As Date, Vdate2 As Date) As Integer Dim year1 As Integer Dim year2 As Integer Dim year3 As Integer Dim month1 As Integer Dim month2 As Integer Dim month3 As Integer Dim day1 As Integer Dim day2 As Integer year1 = Int(DatePart("yyyy", Vdate1)) year2 = Int(DatePart("yyyy", Vdate2)) month1 = Int(DatePart("m", Vdate1)) month2 = Int(DatePart("m", Vdate2)) day1 = Int(DatePart("d", Vdate1)) day2 = Int(DatePart("d", Vdate2)) If month2 < month1 Or day2 < day1 Then If (year2 - year1) - 1 < 0 Then DatDiffY = 0 Else DatDiffY = (year2 - year1) - 1 End If Else DatDiffY = year2 - year1 End If End Function Function DatDiffM(Vdate1 As Date, Vdate2 As Date) As Integer Dim day1 As Integer Dim day2 As Integer Dim month1 As Integer Dim month2 As Integer Dim month3 As Integer Dim year1 As Integer Dim year2 As Integer Dim dateC1 As Date day1 = Int(DatePart("d", Vdate1)) day2 = Int(DatePart("d", Vdate2)) month1 = Int(DatePart("m", Vdate1)) month2 = Int(DatePart("m", Vdate2)) year1 = Int(DatePart("yyyy", Vdate1)) year2 = Int(DatePart("yyyy", Vdate2)) If month2 < month1 Or day2 < day1 Then If month2 < month1 And day2 > day1 Then month3 = month2 + 12 DatDiffM = (month3 - month1) End If If month2 < month1 And day2 < day1 Then month3 = (month2 + 12) - 1 If (month3 - month1) - 1 < 0 Then DatDiffM = 0 Else DatDiffM = (month3 - month1) End If End If If month2 > month1 And day2 < day1 Then DatDiffM = (month2 - month1) - 1 End If Else DatDiffM = month2 - month1 End If End Function Function DatDiffD(Vdate1 As Date, Vdate2 As Date) As Integer Dim day1 As Integer Dim day2 As Integer Dim month1 As Integer Dim month2 As Integer Dim month3 As Integer Dim year1 As Integer Dim year2 As Integer Dim year3 As Integer Dim dateC1 As Date day1 = Int(DatePart("d", Vdate1)) day2 = Int(DatePart("d", Vdate2)) month1 = Int(DatePart("m", Vdate1)) month2 = Int(DatePart("m", Vdate2)) year1 = Int(DatePart("yyyy", Vdate1)) year2 = Int(DatePart("yyyy", Vdate2)) If day2 < day1 Then month3 = month2 - 1 dateC1 = DateSerial(year2, month3, day1) DatDiffD = DateDiff("d", dateC1, Vdate2) Else DatDiffD = day2 - day1 End If End Function و هذه هي طريقة الاستدعاء Me.text3 = DatDiffY(Me.text1, Me.text2) Me.text4 = DatDiffM(Me.text1, Me.text2) Me.text5 = DatDiffD(Me.text1, Me.text2)
  8. تسلم استاذي موسي و استاذي عمر جزاكم الله عني خيرا
  9. تسلم استاذي عمر نبدا باذن الله اول خطوه
  10. Up هل من رابط لموضوع مشابه لكي اتعلم منه اذا كان الموضوع كبير
  11. رفع اكسس علي شبكة محلية حتي يتم استخدامه من 2 يوزر كيف لي عمل ذلك
  12. السلام عليكم خبراء المنتدي الكرام مساعدة في هذا الكود عندي زر يقوم بمسح جميع البيانات من كل الجدوال و لكن اريد في جدول المستخدمين ان يمسح جميع بيانات المستخدمين و لكن مع الابقاء علي السجل الاول DoCmd.RunSQL " delete * from Users"
  13. ممكن استاذي الكريم تفهمني كانت اية المشكلة ...اشكرك شكرا جزيلا ...مشكلة تنسيق علي ما اظن ...مستني رد حضرتك
  14. السلام عليكم .. لابد من التحية عند بدء أى مشاركة ,,عندي شيت اكسيل بة بيانات الموظفين من ضمن هذه البيانات الرقم القومي و الرقم التأميني و بيانات اخري و عندي شيت تاني معمول فية بيان حالة وظيفية باستخدام دالة vLookUp و شغالة تمام ماعدا حقل الرقم القومي و الرقم التأميني كما هو موضح بالصورة ..فما العمل ...في الورقة الثانية استاذي الكريم كامل المحكمة للمستشار.xlsx
  15. الله عليك يا استاذي مبرمج سابق تسلم ايديك اشكرك هو المطلوب
  16. كنت عايز اعرف هل من الممكن السؤال عن السجل الحالي اذا كان سجل جديدا ام لا وذلك باستخدام if
  17. اشكرك الله يرحم ابائنا جميعا ان شاء الله احياء او اموات بالتوفيق للجميع اللهم امين يارب العالمين علية افضل الصلاة و السلام
  18. استاذي العزيز يجب شكركم لاني استفيد من شروحكم و تعليمكم لي , فأنا استفدت كثيرا كثيرا من هذا المنتدي و لولاه ماكنت بهذه المعلومات و كثيرا ما افادني المهندس قاسم و الاستاذ الكبير جعفر و الاستاذ الكبير اباجودي و الخبراء الاجلاء في هذا المنتدي كثر حتي لا انسي احد و كثيرا ما استفدت منهم و مازلت استفيد حتي الان استفيد من خبراتهم و علي ذكر الاستفاده فأنا استفدت من فكرة حضرتك و سوف انفذها ان شاء الله فهي سوف تسهل علي الكثير من الوقت و شكرا جزيلا لك استاذي مبرمج سابق و اسف علي التأخير في الرد لاني لم افتح المنتدي من يوم السبت
  19. شكرا استاذي العزيز المهندس قاسم Eng.Qassim تعبتك شكرا استاذي الغالي مبرمج سابق مبرمج سابق
  20. كلام حضرتك مظبوط هو انا خفت لمعرفش اعملها
  21. تسلم استاذي الغالي خطاء مني نسيت اضع حقل emp_code اللي بناء علية هايتم لصق السجلات شاكر استاذي المهندس قاسم
×
×
  • اضف...

Important Information