بحث مخصص من جوجل فى أوفيسنا
![]()
Custom Search
|
-
Posts
9903 -
تاريخ الانضمام
-
تاريخ اخر زياره
-
Days Won
404
نوع المحتوي
المنتدى
مكتبة الموقع
معرض الصور
المدونات
الوسائط المتعددة
كل منشورات العضو jjafferr
-
1 و 2 نعم ، اما 3 ، فلا ، والبرنامج اصلا لن يسمح لكن بذلك جعفر
-
يا حبيبي ، لوسمحت لا تدخلني في امورك الخاصة مع أخي محمد انا فقط ردّيت على الجزء السهل اللي انا عرفته جعفر
-
-
حساب اقدمية من تاريخ بالسنة والشهر واليوم
jjafferr replied to طاهر اوفيسنا's topic in قسم الأكسيس Access
حياك الله -
حساب اقدمية من تاريخ بالسنة والشهر واليوم
jjafferr replied to طاهر اوفيسنا's topic in قسم الأكسيس Access
تفضل ، والعد التنازلي للنوم = 10 دقائق من الان Public Sub Calculate_Diff() '1 'الخدمة الفعلية 'D1 ealier, D2 later Dim D1, D2 As Date D1 = Me.date_recrut D2 = #12/31/2015# 'leave if No date entered If Len(D1 & "") = 0 Then Exit Sub 'don't check get values unless D2 is populated If Len(D2 & "") = 0 Then Exit Sub Call YMDDif3(D1, D2, Y, M, D) '**change 1 'if D >= 30, then make it 1 month If D >= 30 Then D = D - 30 M = M + 1 End If If M >= 12 Then M = M - 12 Y = Y + 1 End If '**1 Me.Année2 = Y Me.Mois2 = M Me.Jours2 = D '2 'أقدمية الجنوب 'Convert Years, Months, Days to southern 'Convert Years to sMonth sM = Y * 4 'Convert every 6 months to sMonths sM2 = Int(M / 6) * 2 'Convert Remaining months to sDays sD = (M - Int(M / 6) * 6) * 10 'Convert Days to sDays sD2 = Int(D / 10) * 3 'Add the sM, sD 'add the sMonths sM = sM + sM2 'add the sDays sD = sD + sD2 'Finalizing 'Convert sD more than 30days to sM sM3 = Int(sD / 30) '# Final sD sD3 = sD - Int(sD / 30) * 30 'add the extra months from sD to sM sM3 = sM + sM3 '# Final sY sY3 = Int(sM3 / 12) '# Final sM sM3 = sM3 - Int(sM3 / 12) * 12 '**change 2 'No more than 6 years If sY3 >= 6 Then Me.Année1 = 6 Me.Mois1 = 0 Me.Jours1 = 0 Else Me.Année1 = sY3 Me.Mois1 = sM3 Me.Jours1 = sD3 End If '**2 '3 'المجموع 'add the Years, Months, Days '**change3 If sY3 >= 6 Then sY3 = 0 sM3 = 0 sD3 = 0 End If '**3 sY4 = sY3 + Y sM4 = sM3 + M sD4 = sD3 + D 'Convert more than 30days to Months sM5 = Int(sD4 / 30) '# Final Days sD5 = sD4 - Int(sD4 / 30) * 30 'add the extra months from the Days sM5 = sM4 + sM5 '# Final Years sY5 = Int(sM5 / 12) + sY4 '# Final Months sM5 = sM5 - Int(sM5 / 12) * 12 Me.Année4 = sY5 Me.Mois4 = sM5 Me.Jours4 = sD5 End Sub جعفر -
حساب اقدمية من تاريخ بالسنة والشهر واليوم
jjafferr replied to طاهر اوفيسنا's topic in قسم الأكسيس Access
هاي لازم تكون 31سنة + 06 سنة = 37سنة -
حساب اقدمية من تاريخ بالسنة والشهر واليوم
jjafferr replied to طاهر اوفيسنا's topic in قسم الأكسيس Access
تفضل Public Sub Calculate_Diff() '1 'الخدمة الفعلية 'D1 ealier, D2 later Dim D1, D2 As Date D1 = Me.date_recrut D2 = #12/31/2015# 'leave if No date entered If Len(D1 & "") = 0 Then Exit Sub 'don't check get values unless D2 is populated If Len(D2 & "") = 0 Then Exit Sub Call YMDDif3(D1, D2, Y, M, D) '**change 1 'if D >= 30, then make it 1 month If D >= 30 Then D = D - 30 M = M + 1 End If If M >= 12 Then M = M - 12 Y = Y + 1 End If '**1 Me.Année2 = Y Me.Mois2 = M Me.Jours2 = D '2 'أقدمية الجنوب 'Convert Years, Months, Days to southern 'Convert Years to sMonth sM = Y * 4 'Convert every 6 months to sMonths sM2 = Int(M / 6) * 2 'Convert Remaining months to sDays sD = (M - Int(M / 6) * 6) * 10 'Convert Days to sDays sD2 = Int(D / 10) * 3 'Add the sM, sD 'add the sMonths sM = sM + sM2 'add the sDays sD = sD + sD2 'Finalizing 'Convert sD more than 30days to sM sM3 = Int(sD / 30) '# Final sD sD3 = sD - Int(sD / 30) * 30 'add the extra months from sD to sM sM3 = sM + sM3 '# Final sY sY3 = Int(sM3 / 12) '# Final sM sM3 = sM3 - Int(sM3 / 12) * 12 '**change 2 'No more than 6 years If sY3 >= 6 Then Me.Année4 = 6 Me.Mois4 = 0 Me.Jours4 = 0 Else Me.Année4 = sY3 Me.Mois4 = sM3 Me.Jours4 = sD3 End If '**2 '3 'المجموع 'add the Years, Months, Days sY4 = sY3 + Y sM4 = sM3 + M sD4 = sD3 + D 'Convert more than 30days to Months sM5 = Int(sD4 / 30) '# Final Days sD5 = sD4 - Int(sD4 / 30) * 30 'add the extra months from the Days sM5 = sM4 + sM5 '# Final Years sY5 = Int(sM5 / 12) + sY4 '# Final Months sM5 = sM5 - Int(sM5 / 12) * 12 Me.Année4 = sY5 Me.Mois4 = sM5 Me.Jours4 = sD5 End Sub جعفر -
هذا صحيح ، ولكن أخي سعيد كان يشير الى سبب رسالة الخطأ عموما ، لهذا السبب ، انا اضفت وقلت: جعفر
-
حساب اقدمية من تاريخ بالسنة والشهر واليوم
jjafferr replied to طاهر اوفيسنا's topic in قسم الأكسيس Access
تفضل: Public Sub Calculate_Diff() '1 'الخدمة الفعلية 'D1 ealier, D2 later Dim D1, D2 As Date D1 = Me.date_recrut D2 = #12/31/2015# 'leave if No date entered If Len(D1 & "") = 0 Then Exit Sub 'don't check get values unless D2 is populated If Len(D2 & "") = 0 Then Exit Sub Call YMDDif3(D1, D2, Y, M, D) '**change 1 'if D >= 30, then make it 1 month If D >= 30 Then D = D - 30 M = M + 1 End If If M >= 12 Then M = M - 12 Y = Y + 1 End If '**1 Me.Année2 = Y Me.Mois2 = M Me.Jours2 = D '2 'أقدمية الجنوب 'Convert Years, Months, Days to southern 'Convert Years to sMonth sM = Y * 4 'Convert every 6 months to sMonths sM2 = Int(M / 6) * 2 'Convert Remaining months to sDays sD = (M - Int(M / 6) * 6) * 10 'Convert Days to sDays sD2 = Int(D / 10) * 3 'Add the sM, sD 'add the sMonths sM = sM + sM2 'add the sDays sD = sD + sD2 'Finalizing 'Convert sD more than 30days to sM sM3 = Int(sD / 30) '# Final sD sD3 = sD - Int(sD / 30) * 30 'add the extra months from sD to sM sM3 = sM + sM3 '# Final sY sY3 = Int(sM3 / 12) '# Final sM sM3 = sM3 - Int(sM3 / 12) * 12 Me.Année1 = sY3 Me.Mois1 = sM3 Me.Jours1 = sD3 '3 'المجموع 'add the Years, Months, Days sY4 = sY3 + Y sM4 = sM3 + M sD4 = sD3 + D 'Convert more than 30days to Months sM5 = Int(sD4 / 30) '# Final Days sD5 = sD4 - Int(sD4 / 30) * 30 'add the extra months from the Days sM5 = sM4 + sM5 '# Final Years sY5 = Int(sM5 / 12) + sY4 '# Final Months sM5 = sM5 - Int(sM5 / 12) * 12 '**change 2 'No more than 6 years If sY5 >= 6 Then Me.Année4 = 6 Me.Mois4 = 0 Me.Jours4 = 0 Else Me.Année4 = sY5 Me.Mois4 = sM5 Me.Jours4 = sD5 End If '**2 End Sub جعفر -
. نعم ، ولكن ما ادري اذا تستطيع عمله او لا 1. اذا كان برنامجك accdb مثلا ، تأكد ان النموذج الرئيسي يتم فتحه تلقائيا عند فتح البرنامج ، 2. غيّر اسم الملف من accdb الى accdr ، وبهذه الطريقة يكون الملف مُقفل اتحداك انك تقدر تعملها جعفر
-
حساب اقدمية من تاريخ بالسنة والشهر واليوم
jjafferr replied to طاهر اوفيسنا's topic in قسم الأكسيس Access
وعليكم السلام جرب هذا التغيير لوسمحت: Public Sub Calculate_Diff() '1 'الخدمة الفعلية 'D1 ealier, D2 later Dim D1, D2 As Date D1 = Me.date_recrut D2 = #12/31/2015# 'leave if No date entered If Len(D1 & "") = 0 Then Exit Sub 'don't check get values unless D2 is populated If Len(D2 & "") = 0 Then Exit Sub Call YMDDif3(D1, D2, Y, M, D) '**change 1 'if D >= 30, then make it 1 month If D >= 30 Then D = D - 30 M = M + 1 End If '**1 Me.Année2 = Y Me.Mois2 = M Me.Jours2 = D '2 'أقدمية الجنوب 'Convert Years, Months, Days to southern 'Convert Years to sMonth sM = Y * 4 'Convert every 6 months to sMonths sM2 = Int(M / 6) * 2 'Convert Remaining months to sDays sD = (M - Int(M / 6) * 6) * 10 'Convert Days to sDays sD2 = Int(D / 10) * 3 'Add the sM, sD 'add the sMonths sM = sM + sM2 'add the sDays sD = sD + sD2 'Finalizing 'Convert sD more than 30days to sM sM3 = Int(sD / 30) '# Final sD sD3 = sD - Int(sD / 30) * 30 'add the extra months from sD to sM sM3 = sM + sM3 '# Final sY sY3 = Int(sM3 / 12) '# Final sM sM3 = sM3 - Int(sM3 / 12) * 12 Me.Année1 = sY3 Me.Mois1 = sM3 Me.Jours1 = sD3 '3 'المجموع 'add the Years, Months, Days sY4 = sY3 + Y sM4 = sM3 + M sD4 = sD3 + D 'Convert more than 30days to Months sM5 = Int(sD4 / 30) '# Final Days sD5 = sD4 - Int(sD4 / 30) * 30 'add the extra months from the Days sM5 = sM4 + sM5 '# Final Years sY5 = Int(sM5 / 12) + sY4 '# Final Months sM5 = sM5 - Int(sM5 / 12) * 12 '**change 2 'No more than 6 years If sY5 >= 6 Then Me.Année4 = 6 Me.Mois4 = 0 Me.Jours4 = 0 Else Me.Année4 = sY5 Me.Mois4 = sM5 Me.Jours4 = sD5 End If '**2 End Sub جعفر -
وعليكم السلام نصيحة: اول ما تنقل محتويات برنامج الى آخر ، تأكد انك تقارن مكتبات VBA البرنامجين ايضا وردا على سؤالك ، وتأييدا لما قاله اخي سعيد: . او تختار: Microsoft Office xx.x Access Database Engine Object Library فمثلا اذا عندك اكسس 2010 ، سيكون: Microsoft Office 14.0 Access Database Engine Object Library جعفر
-
حساب اقدمية من تاريخ بالسنة والشهر واليوم
jjafferr replied to طاهر اوفيسنا's topic in قسم الأكسيس Access
السلام عليكم أخي كريمو الموضوع بالنسبة لي كان أصعب مما تصورت على العموم ، هذا الكود يقوم بالعمل ، وهو حدث على الحالي ، وحدث بعد تحديث التاريخ ، وبما انه لا يوجد تاريخ "الى" في النموذج ، لذلك فانا وضعته في الكود باسم D2 حاولت ان اترك ملاحظات على الكود قدر الامكان: Public Sub Calculate_Diff() '1 'الخدمة الفعلية 'D1 ealier, D2 later Dim D1, D2 As Date D1 = Me.date_recrut D2 = #12/31/2015# 'leave if No date entered If Len(D1 & "") = 0 Then Exit Sub 'don't check get values unless D2 is populated If Len(D2 & "") = 0 Then Exit Sub Call YMDDif3(D1, D2, Y, M, D) Me.Année2 = Y Me.Mois2 = M Me.Jours2 = D '2 'أقدمية الجنوب 'Convert Years, Months, Days to southern 'Convert Years to sMonth sM = Y * 4 'Convert every 6 months to sMonths sM2 = Int(M / 6) * 2 'Convert Remaining months to sDays sD = (M - Int(M / 6) * 6) * 10 'Convert Days to sDays sD2 = Int(D / 10) * 3 'Add the sM, sD 'add the sMonths sM = sM + sM2 'add the sDays sD = sD + sD2 'Finalizing 'Convert sD more than 30days to sM sM3 = Int(sD / 30) '# Final sD sD3 = sD - Int(sD / 30) * 30 'add the extra months from sD to sM sM3 = sM + sM3 '# Final sY sY3 = Int(sM3 / 12) '# Final sM sM3 = sM3 - Int(sM3 / 12) * 12 Me.Année1 = sY3 Me.Mois1 = sM3 Me.Jours1 = sD3 '3 'المجموع 'add the Years, Months, Days sY4 = sY3 + Y sM4 = sM3 + M sD4 = sD3 + D 'Convert more than 30days to Months sM5 = Int(sD4 / 30) '# Final Days sD5 = sD4 - Int(sD4 / 30) * 30 'add the extra months from the Days sM5 = sM4 + sM5 '# Final Years sY5 = Int(sM5 / 12) + sY4 '# Final Months sM5 = sM5 - Int(sM5 / 12) * 12 Me.Année4 = sY5 Me.Mois4 = sM5 Me.Jours4 = sD5 End Sub Private Sub date_recrut_AfterUpdate() Call Calculate_Diff End Sub Private Sub Form_Current() Call Calculate_Diff End Sub هذه الوحدة النمطية تقوم بحساب السنة ، الشهر ، اليوم ، بين تاريخين: Option Compare Database Public Sub YMDDif(sDate1, sDate2, Y, M, D) 'sdate1 earliest date sdate2 later Dim iYear As Integer Dim iMonth As Integer Dim iDay As Integer Dim dInterim1 As Date iMonth = DateDiff("m", sDate1, sDate2) If Day(sDate1) > Day(sDate2) Then iMonth = iMonth - 1 End If dInterim1 = DateAdd("m", iMonth, sDate1) iDay = DateDiff("d", dInterim1, sDate2) D = iDay M = iMonth Mod 12 Y = iMonth \ 12 End Sub Public Function YMDDif2(sDate1, sDate2) On Error GoTo err_YMDDif2 'sDate1 earliest date 'sDate2 later date Dim dInterim1 As Date iMonth = DateDiff("m", sDate1, sDate2) If Day(sDate1) > Day(sDate2) Then iMonth = iMonth - 1 End If dInterim1 = DateAdd("m", iMonth, sDate1) iDay = DateDiff("d", dInterim1, sDate2) D = iDay M = iMonth Mod 12 Y = iMonth \ 12 'YMDDif2 = CStr(Y) & " Years " & CStr(M) & " months " & CStr(D) & " days" 'YMDDif2 = CStr(Y) & " س /" & CStr(M) & " ش /" & CStr(D) & " ي" YMDDif2 = CStr(Y) & " س/" & CStr(M) & " ش/" & CStr(D) & " ي" Exit Function err_YMDDif2: If Err.Number = 94 Then 'ignor, null Resume Next Else MsgBox Err.Number & vbCrLf & Err.Description End If End Function 'Public Sub YMDDif3(sDate1, sDate2, ByRef y As Integer, ByRef M As Integer, ByRef D As Integer) Public Sub YMDDif3(sDate1, sDate2, Y, M, D) 'sdate1 earliest date sdate2 later Dim iYear As Integer Dim iMonth As Integer Dim iDay As Integer Dim dInterim1 As Date iMonth = DateDiff("m", sDate1, sDate2) If Day(sDate1) > Day(sDate2) Then iMonth = iMonth - 1 End If dInterim1 = DateAdd("m", iMonth, sDate1) iDay = DateDiff("d", dInterim1, sDate2) D = iDay M = iMonth Mod 12 Y = iMonth \ 12 End Sub وصدقني اني صار لي يومين احاول الوصول للنتيجة ، وعملت اكثر من برمجة ولم تفلح ، وقد عبّأت ورقتين مِلئُها ارقام فلهذا السبب ، رجاء بسرعة اذا عندك اي استفسار ،فانا محتاج الى هذه الاوراق ان تكون امامي ، وقبل ان اتخلص منها جعفر 237.حساب اقدمية.accdb.zip 237.حساب اقدمية.pdf.zip -
حساب اقدمية من تاريخ بالسنة والشهر واليوم
jjafferr replied to طاهر اوفيسنا's topic in قسم الأكسيس Access
يعني الشهر 30يوم؟ -
حساب اقدمية من تاريخ بالسنة والشهر واليوم
jjafferr replied to طاهر اوفيسنا's topic in قسم الأكسيس Access
أخي كريمو اذا صار عندنا 65 يوم ، فما الحل؟ جعفر -
السلام عليكم بالاضافة الى فيديو الاخ سعيد ، انا كنت عامل مثال في هذا الرابط: http://www.officena.net/ib/topic/65726-هدية-المدة-بين-تاريخين-،-و-اضافةخصم-سنوات-واشهر-وايام/ جعفر
-
هدية: البحث عن اي جزء من الكلمة ، في اي عدد من الحقول
jjafferr replied to jjafferr's topic in قسم الأكسيس Access
اذا كنت في شبكة ، احسن لك ان تستخدم زر البحث جعفر -
ربط مربعين سرد وتصفير الثاني في حالة تغير قيمة الاول
jjafferr replied to simsimasy's topic in قسم الأكسيس Access
وعليكم السلام اختي اشتغل على مشاركة الآن ، وبعدها وبعد الغداء ان شاء الله اشوف موضوعك جعفر -
هدية: البحث عن اي جزء من الكلمة ، في اي عدد من الحقول
jjafferr replied to jjafferr's topic in قسم الأكسيس Access
نعم تستطيع التغلب على هذا البطئ بعمل جدول محلي في برنامجك ، بحيث: تعمل جدول محلي فيه جميع حقول الجدول الاساسي الذي على الشبكة ، على "حدث تحميل" نموذج البحث ، احذف بيانات الجدول المحلي ، واضف بيانات جدول جدول الشبكة ، غيّر في الكود ، واجعل البحث يكون في الجدول المحلي ، ولكن عندما تريد فتح معلومات السجل ، اجعل الكود يفتح لك بيانات الجدول الذي على الشبكة ، بسبب حذف البيانات والحاق/اضافة بيانات جديدة في البرنامج المحلي ، فحجمه سيكبر ، لذلك عليك استعمال الضغط والاصلاح بين فترة واخرى حتى يرجع لحجمه الطبيعي جعفر -
هدية: البحث عن اي جزء من الكلمة ، في اي عدد من الحقول
jjafferr replied to jjafferr's topic in قسم الأكسيس Access
السلام عليكم أخوي بسام اول مرة اعمل طريقة البحث هذه كان في 26 / 10 / 2004 فالملاحظة اللي تركتها في نهاية الموضوع وباللون الاحمر ليست ارتجالية ، وإنما عن خبرة جعفر -
هذا هو الحل الاسهل ، واخونا عبدالله استعمله ، ولكن لأنه وضعه في اعدادات مصدر الحقل بعلامة = ، فقفل الادخال ، واخونا سعيد تفادى هذا الخطأ بوضع التنسيق في الكود انا كنت اعمل على نفس الفكرة ، ولكن بتفكيك مكونات الحقل a11 (طبعا الادخال سيكون كما هو ، وبعد الخروج من الحقل ، وفي نفس مكان سطر اخي سعيد ، كنت سأنادي وحدة نمطيه تقوم بتفكيك بيانات الخانه ، ثم إعادة تركيبها بالطريقة المطلوبه) جعفر هكذا: Private Sub a11_AfterUpdate() On Error Resume Next Dim sc As Integer Dim d As Date Dim S As String sc = Calendar Calendar = 0 d = CDate(a11.Text) Calendar = 1 S = CStr(d) a11hijri = Format(S, "YYYY/MM/DD") Calendar = sc Call Reverse_Date_Format End Sub Function Reverse_Date_Format() Dim x() As String If InStr(Me.a11, "-") > 0 Then a = "-" ElseIf InStr(Me.a11, "/") > 0 Then a = "/" End If x = Split(Me.a11, a) a0 = x(0) a1 = x(1) a2 = x(2) If Len(a0) > Len(a2) Then Me.a11 = a0 & a & a1 & a & a2 Else Me.a11 = a2 & a & a1 & a & a0 End If End Function جعفر
-
مشكلة في تشغيل البرنامج على جهاز الزبون
jjafferr replied to عبد الله قدور's topic in قسم الأكسيس Access
السلام عليكم أخي عبدالله هذا الخطأ عادة يكون بسبب اختلافات إعدادات الوندوز بين جهاز المبرمج وجهاز المستخدم ، هذا الرابط سيفيدك ان شاء الله: http://www.officena.net/ib/topic/64955-مشكلة-عند-فتح-البرنامج-على-ويندوز-8 جعفر -
السلام عليكم طبعا بالاضافة الى طرق الشباب ، اليكم طريقة الكسالى 1. غيّر القناع: بدل 0000-00-00;0;_ اجعله 00-00-0000;0;_ 2. قم بإدخال التاريخ بالعكس ، يعني السنة - الشهر - اليوم جعفر
-
أخي غسان الرابط الذي وضعته انت لتغيير حجم الشاشة ، فيه وحدات نمطية تنادي دوال Api الوندوز والمستخدمة في الاكسس الـ 32بت ، ولأن الاكسس الذي تستعمله هو 64بت ، فيجب عليك احتواء/تعديل هذه الدوال حتى حتى تعمل على الاكسس 64بت ، وفي الرابط الذي اعطيتك ، كتبت فيه: فالرجاء قراءة الرابط ، والروابط التي فيه ، حتى تستطيع حل مشكلتك!! انا لا املك اكسس 64بت ، فللأسف لا استطيع تجربة الكود جعفر