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

نجوم المشاركات

  1. ابوخليل

    ابوخليل

    أوفيسنا


    • نقاط

      4

    • Posts

      12,157


  2. ابو جودي

    ابو جودي

    أوفيسنا


    • نقاط

      4

    • Posts

      6,814


  3. محمد هشام.

    محمد هشام.

    الخبراء


    • نقاط

      2

    • Posts

      1,366


  4. J Abuabdullah

    J Abuabdullah

    عضو جديد 01


    • نقاط

      1

    • Posts

      3


Popular Content

Showing content with the highest reputation on 04 ينا, 2024 in all areas

  1. المثال تمام .. ولكن لا اعلم كيف ستدخل التاريخ هل يدويا او تعتمد على الميلادي لادراج ام القرى شوف هذا المثال قريب من مثالك ولكن يشتمل على عملية تحويل الوحدة النمطية صالحة لعام 1500هـ اعدها العلامة ابو هادي ادرس الوحدة النمطية جيدا ... اي عمليات بواسطة الدوال التي تتم على التواريخ ، موجود دوال تقابلها في هذه الوحدة خاصة بتاريخ ام القرى جرب واستكشف واللي يصعب عليك أسأل عنه تحويل التاريخ ميلادي لأم القرى والعكس.rar
    2 points
  2. السلام عليكم ورحمة الله تعالى وبركاته عندما نتحدث عن توسيط النماذج والتقارير لابد من الأخذ فى الاعتبار ان خاصية PopUp لها تأثير كبير فإن كانت PopUp = True لها أكواد تقوم بعمل التوسيط للنماذج والتقارير داخل الشاشة خاصة ولا تقوم بعملها ان كانت PopUp = False والعكس كذلك واحيانا ننسى ذكر هذا الأمر عند عرض الاكواد والامثلة ولذلك تعمل عند البعض ولا تعمل عند اخرين بل واحيانا اثناء التصميم ننسى هذا الامر ايضا ومن أجل ذلك بعد البحث المرير وترتيب الأفكار بفضل الله تعالى تم دمج الأكواد حتى تعمل تبعا للخاصية PopUp ايما كان اعدادها حتى وان نسى المستخدم ذلك الامر أوحتى إن كان لا يدرى عنه شئ المرفق الاتى ان شاء الله به حل المشكلة تماما طيب ما الفرق بين عمل الاكواد مع خاصية PopUp ان كانت PopUp = True يتم توسيط داخل الشاشة نفسها تبعا لابعاد شاشة العرض نفسها مهما اختلف مقاس الشاشة اما ان كان PopUp = False يتم التوسيط داخل اطار تطبيق الاكس نفسه الاكواد كالاتى اولا كلاس ولابد ان يكون اسم الكلاس clsAutoCenter وان احببتم تغيير الاسم فيجب تعديله فى الاكواد التى تخص الموديول بنفس الاسم الجديد اولا الكلاس : clsAutoCenter '|---01/11/2021__________________________________________________________________________________________| '|___www.officena.net_______________________|___________________________________________________________| '| | | '| __ _ | _ +-----------officena-----------+ _ | '| \ `/ | | /o) | ||||| | (o\ | '| \__`! | / / | @(~O^O~)@ | \ \ | '| / ,' `-.__________________ | ( (_ | _ ----oOo--Moh--oOo----- _ | _) ) | '| '-'\_____ U `-. | ((\ \) +/o)----------3ssam---------(o\+ (/ /)) | '| \____()-=O=O=O=O=O=[]====--) | (\\\ \_/ / \ \_/ ///) | '| `.___ ,-----,_______...-' | \ / \ / | '| / .' | \____/________Mohammed Essam________\____/ | '| / .' | | '| / .' | 01/11/2021 | '| `-' | | '|_____www.officena.net_____________________|___________________________________________________________| '|_____Thank you for visiting https://www.officena.net__________________________________________________' Option Compare Database Option Explicit Private Type RECT 'RECT structure used for API calls. Left As Long Top As Long Right As Long Bottom As Long End Type Private Type POINTAPI 'POINTAPI structure used for API calls. X As Long Y As Long End Type Private m_hWnd As Long 'Handle of the window. Private m_rctWindow As RECT 'Rectangle describing the sides of the last polled location of the window. Private Const m_ERR_INVALIDHWND = 1 Private Const m_ERR_NOPARENTWINDOW = 2 #If VBA7 Then Private Declare PtrSafe Function apiIsWindow Lib "user32" Alias "IsWindow" (ByVal hWnd As LongPtr) As Long Private Declare PtrSafe Function apiMoveWindow Lib "user32" Alias "MoveWindow" (ByVal hWnd As LongPtr, ByVal X As Long, ByVal Y As Long, _ ByVal nWidth As Long, ByVal nHeight As Long, ByVal bRepaint As Long) As Long 'Moves and resizes a window in the coordinate system of its parent window. Private Declare PtrSafe Function apiGetWindowRect Lib "user32" Alias "GetWindowRect" (ByVal hWndPtr As Long, lpRect As RECT) As Long 'After calling, the lpRect parameter contains the RECT structure describing the sides of the window in screen coordinates. Private Declare PtrSafe Function apiScreenToClient Lib "user32" Alias "ScreenToClient" (ByVal hWnd As LongPtr, lpPoint As POINTAPI) As Long 'Converts lpPoint from screen coordinates to the coordinate system of the specified client window. Private Declare PtrSafe Function apiGetParent Lib "user32" Alias "GetParent" (ByVal hWnd As LongPtr) As Long 'Returns the handle of the parent window of the specified window. #Else Private Declare Function apiIsWindow Lib "user32" Alias "IsWindow" (ByVal hWnd As Long) As Long Private Declare Function apiMoveWindow Lib "user32" Alias "MoveWindow" (ByVal hWnd As Long, ByVal X As Long, ByVal Y As Long, _ ByVal nWidth As Long, ByVal nHeight As Long, ByVal bRepaint As Long) As Long 'Moves and resizes a window in the coordinate system of its parent window. Private Declare Function apiGetWindowRect Lib "user32" Alias "GetWindowRect" (ByVal hWnd As Long, lpRect As RECT) As Long 'After calling, the lpRect parameter contains the RECT structure describing the sides of the window in screen coordinates. Private Declare Function apiScreenToClient Lib "user32" Alias "ScreenToClient" (ByVal hWnd As Long, lpPoint As POINTAPI) As Long 'Converts lpPoint from screen coordinates to the coordinate system of the specified client window. Private Declare Function apiGetParent Lib "user32" Alias "GetParent" (ByVal hWnd As Long) As Long 'Returns the handle of the parent window of the specified window. #End If Private Sub RaiseError(ByVal lngErrNumber As Long, ByVal strErrDesc As String) 'Raises a user-defined error to the calling procedure. Err.Raise vbObjectError + lngErrNumber, "clFormWindow", strErrDesc End Sub Private Sub UpdateWindowRect() 'Places the current window rectangle position (in pixels, in coordinate system of parent window) in m_rctWindow. Dim ptCorner As POINTAPI If m_hWnd = 0 Or apiIsWindow(m_hWnd) Then apiGetWindowRect m_hWnd, m_rctWindow 'm_rctWindow now holds window coordinates in screen coordinates. If Not Me.Parent Is Nothing Then 'If there is a parent window, convert top, left of window from screen coordinates to parent window coordinates. With ptCorner .X = m_rctWindow.Left .Y = m_rctWindow.Top End With apiScreenToClient Me.Parent.hWnd, ptCorner With m_rctWindow .Left = ptCorner.X .Top = ptCorner.Y End With 'If there is a parent window, convert bottom, right of window from screen coordinates to parent window coordinates. With ptCorner .X = m_rctWindow.Right .Y = m_rctWindow.Bottom End With apiScreenToClient Me.Parent.hWnd, ptCorner With m_rctWindow .Right = ptCorner.X .Bottom = ptCorner.Y End With End If Else RaiseError m_ERR_INVALIDHWND, "The window handle " & m_hWnd & " is no longer valid." End If End Sub Public Property Get hWnd() As Long 'Returns the value the user has specified for the window's handle. If m_hWnd = 0 Or apiIsWindow(m_hWnd) Then hWnd = m_hWnd Else RaiseError m_ERR_INVALIDHWND, "The window handle " & m_hWnd & " is no longer valid." End If End Property Public Property Let hWnd(ByVal lngNewValue As Long) 'Sets the window to use by specifying its handle. 'Only accepts valid window handles. If lngNewValue = 0 Or apiIsWindow(lngNewValue) Then m_hWnd = lngNewValue Else RaiseError m_ERR_INVALIDHWND, "The value passed to the hWnd property is not a valid window handle." End If End Property Public Property Get Left() As Long 'Returns the current position (in pixels) of the left edge of the window in the coordinate system of its parent window. If m_hWnd = 0 Or apiIsWindow(m_hWnd) Then UpdateWindowRect Left = m_rctWindow.Left Else RaiseError m_ERR_INVALIDHWND, "The window handle " & m_hWnd & " is no longer valid." End If End Property Public Property Let Left(ByVal lngNewValue As Long) 'Moves the window such that its left edge falls at the position indicated '(measured in pixels, in the coordinate system of its parent window). If m_hWnd = 0 Or apiIsWindow(m_hWnd) Then UpdateWindowRect With m_rctWindow apiMoveWindow m_hWnd, lngNewValue, .Top, .Right - .Left, .Bottom - .Top, True End With Else RaiseError m_ERR_INVALIDHWND, "The window handle " & m_hWnd & " is no longer valid." End If End Property '---------------------------------------------------- Public Property Get Top() As Long 'Returns the current position (in pixels) of the top edge of the window in the coordinate system of its parent window. If m_hWnd = 0 Or apiIsWindow(m_hWnd) Then UpdateWindowRect Top = m_rctWindow.Top Else RaiseError m_ERR_INVALIDHWND, "The window handle " & m_hWnd & " is no longer valid." End If End Property Public Property Let Top(ByVal lngNewValue As Long) 'Moves the window such that its top edge falls at the position indicated '(measured in pixels, in the coordinate system of its parent window). If m_hWnd = 0 Or apiIsWindow(m_hWnd) Then UpdateWindowRect With m_rctWindow apiMoveWindow m_hWnd, .Left, lngNewValue, .Right - .Left, .Bottom - .Top, True End With Else RaiseError m_ERR_INVALIDHWND, "The window handle " & m_hWnd & " is no longer valid." End If End Property '---------------------------------------------------- Public Property Get Width() As Long 'Returns the current width (in pixels) of the window. If m_hWnd = 0 Or apiIsWindow(m_hWnd) Then UpdateWindowRect With m_rctWindow Width = .Right - .Left End With Else RaiseError m_ERR_INVALIDHWND, "The window handle " & m_hWnd & " is no longer valid." End If End Property Public Property Let Width(ByVal lngNewValue As Long) 'Changes the width of the window to the value provided (in pixels). If m_hWnd = 0 Or apiIsWindow(m_hWnd) Then UpdateWindowRect With m_rctWindow apiMoveWindow m_hWnd, .Left, .Top, lngNewValue, .Bottom - .Top, True End With Else RaiseError m_ERR_INVALIDHWND, "The window handle " & m_hWnd & " is no longer valid." End If End Property '---------------------------------------------------- Public Property Get Height() As Long 'Returns the current height (in pixels) of the window. If m_hWnd = 0 Or apiIsWindow(m_hWnd) Then UpdateWindowRect With m_rctWindow Height = .Bottom - .Top End With Else RaiseError m_ERR_INVALIDHWND, "The window handle " & m_hWnd & " is no longer valid." End If End Property Public Property Let Height(ByVal lngNewValue As Long) 'Changes the height of the window to the value provided (in pixels). If m_hWnd = 0 Or apiIsWindow(m_hWnd) Then UpdateWindowRect With m_rctWindow apiMoveWindow m_hWnd, .Left, .Top, .Right - .Left, lngNewValue, True End With Else RaiseError m_ERR_INVALIDHWND, "The window handle " & m_hWnd & " is no longer valid." End If End Property Public Property Get Parent() As clsAutoCenter 'Returns the parent window as a clFormWindow object. 'For forms, this should be the Access MDI window. Dim fwParent As New clsAutoCenter Dim lngHWnd As Long If m_hWnd = 0 Then Set Parent = Nothing ElseIf apiIsWindow(m_hWnd) Then lngHWnd = apiGetParent(m_hWnd) fwParent.hWnd = lngHWnd Set Parent = fwParent Else RaiseError m_ERR_INVALIDHWND, "The window handle " & m_hWnd & " is no longer valid." End If Set fwParent = Nothing End Property ثانيا الموديول ولن يفرق اسم الموديول فى شئ '|---01/11/2021__________________________________________________________________________________________| '|___www.officena.net_______________________|___________________________________________________________| '| | | '| __ _ | _ +-----------officena-----------+ _ | '| \ `/ | | /o) | ||||| | (o\ | '| \__`! | / / | @(~O^O~)@ | \ \ | '| / ,' `-.__________________ | ( (_ | _ ----oOo--Moh--oOo----- _ | _) ) | '| '-'\_____ U `-. | ((\ \) +/o)----------3ssam---------(o\+ (/ /)) | '| \____()-=O=O=O=O=O=[]====--) | (\\\ \_/ / \ \_/ ///) | '| `.___ ,-----,_______...-' | \ / \ / | '| / .' | \____/________Mohammed Essam________\____/ | '| / .' | | '| / .' | 01/11/2021 | '| `-' | | '|_____www.officena.net_____________________|___________________________________________________________| '|_____Thank you for visiting https://www.officena.net__________________________________________________' Option Compare Database Option Explicit Private Type RECT X1 As Long Y1 As Long X2 As Long Y2 As Long End Type #If VBA7 Then Private Declare PtrSafe Function GetDesktopWindow Lib "user32" () As LongPtr Private Declare PtrSafe Function GetWindowRect Lib "user32" (ByVal hWnd As LongPtr, lpRect As RECT) As Long Private Declare PtrSafe Function GetDC Lib "user32" (ByVal hWnd As LongPtr) As LongPtr Private Declare PtrSafe Function ReleaseDC Lib "user32" (ByVal hWnd As LongPtr, ByVal hDC As LongPtr) As Long Private Declare PtrSafe Function GetDeviceCaps Lib "gdi32" (ByVal hDC As LongPtr, ByVal nIndex As Long) As Long #Else Private Declare Function GetDesktopWindow Lib "user32" () As Long Private Declare Function GetWindowRect Lib "user32" (ByVal hWnd As Long, Rectangle As RECT) As Boolean Private Declare Function GetDC Lib "user32" (ByVal hWnd As Long) As Long Private Declare Function ReleaseDC Lib "user32" (ByVal hWnd As Long, ByVal hDC As Long) As Long Private Declare Function GetDeviceCaps Lib "gdi32" (ByVal hDC As Long, ByVal nIndex As Long) As Long #End If Private Const WU_LOGPIXELSX = 88 Private Const WU_LOGPIXELSY = 90 ' Call CenterForm(Me) ' Call CenterReport(Me) Sub CenterForm(F As Form) If F.PopUp = False Then Dim fw As New clsAutoCenter fw.hWnd = F.hWnd With fw .Top = (.Parent.Height - .Height) / 2 .Left = (.Parent.Width - .Width) / 2 End With Set fw = Nothing ElseIf F.PopUp = True Then Dim formWidth As Long, formHeight As Long Dim MaxWidth As Long, maxHeight As Long Dim ScreenWidth As Long, ScreenHeight As Long Dim formAllMarginsHeight As Long, formAllMarginsWidth As Long GetScreenResolution ScreenWidth, ScreenHeight ScreenWidth = ConvertPixelsToTwips(ScreenWidth, 0) ScreenHeight = ConvertPixelsToTwips(ScreenHeight, 0) MaxWidth = ScreenWidth * 0.6 maxHeight = ScreenHeight * 0.9 formAllMarginsHeight = F.WindowHeight - F.Section(acDetail).Height formAllMarginsWidth = F.Width formWidth = formAllMarginsWidth formHeight = formAllMarginsHeight If formHeight < F.WindowHeight Then formHeight = F.WindowHeight End If DoCmd.MoveSize (ScreenWidth - formWidth) / 2, (ScreenHeight - formHeight) / 2, formWidth, formHeight End If End Sub Sub CenterReport(R As Report) If R.PopUp = False Then Dim fw As New clsAutoCenter fw.hWnd = R.hWnd With fw .Top = (.Parent.Height - .Height) / 2 .Left = (.Parent.Width - .Width) / 2 End With Set fw = Nothing ElseIf R.PopUp = True Then Dim ReportWidth As Long, ReportHeight As Long Dim MaxWidth As Long, maxHeight As Long Dim ScreenWidth As Long, ScreenHeight As Long Dim ReportAllMarginsHeight As Long, ReportAllMarginsWidth As Long GetScreenResolution ScreenWidth, ScreenHeight ScreenWidth = ConvertPixelsToTwips(ScreenWidth, 0) ScreenHeight = ConvertPixelsToTwips(ScreenHeight, 0) MaxWidth = ScreenWidth * 0.6 maxHeight = ScreenHeight * 0.9 ReportAllMarginsHeight = R.WindowHeight - R.Section(acDetail).Height ReportAllMarginsWidth = R.Width ReportWidth = ReportAllMarginsWidth ReportHeight = ReportAllMarginsHeight If ReportHeight < R.WindowHeight Then ReportHeight = R.WindowHeight End If DoCmd.MoveSize (ScreenWidth - ReportWidth) / 2, (ScreenHeight - ReportHeight) / 2, ReportWidth, ReportHeight End If End Sub Function ConvertTwipsToPixels(lngTwips As Long, lngDirection As Long) As Long Dim lngPixelsPerInch As Long Const nTwipsPerInch = 1440 #If VBA7 Then Dim lngDC As LongPtr #Else Dim lngDC As Long #End If lngDC = GetDC(0) If (lngDirection = 0) Then lngPixelsPerInch = GetDeviceCaps(lngDC, WU_LOGPIXELSX) Else lngPixelsPerInch = GetDeviceCaps(lngDC, WU_LOGPIXELSY) End If lngDC = ReleaseDC(0, lngDC) ConvertTwipsToPixels = (lngTwips / nTwipsPerInch) * lngPixelsPerInch End Function Function ConvertPixelsToTwips(lngPixels As Long, lngDirection As Long) As Long Dim lngPixelsPerInch As Long Const nTwipsPerInch = 1440 #If VBA7 Then Dim lngDC As LongPtr #Else Dim lngDC As Long #End If lngDC = GetDC(0) If (lngDirection = 0) Then lngPixelsPerInch = GetDeviceCaps(lngDC, WU_LOGPIXELSX) Else lngPixelsPerInch = GetDeviceCaps(lngDC, WU_LOGPIXELSY) End If lngDC = ReleaseDC(0, lngDC) ConvertPixelsToTwips = (lngPixels * nTwipsPerInch) / lngPixelsPerInch End Function Private Sub GetScreenResolution(ByRef Width As Long, ByRef Height As Long) Dim R As RECT Dim RetVal As Long #If VBA7 Then Dim hWnd As LongPtr #Else Dim hWnd As Long #End If hWnd = GetDesktopWindow() RetVal = GetWindowRect(hWnd, R) Width = R.X2 - R.X1 Height = R.Y2 - R.Y1 End Sub ويتم استدعاء كود توسيط النماذج من خلال السطر الاتى فى حدث عند الفتح Call CenterForm(Me) ويتم استدعاء كود توسيط التقارير من خلال السطر الاتى فى حدث عند الفتح Call CenterReport(Me) فى حالة كانت PopUp = True يتم توسيط النماذج والتقارير فى وسط شاشة الحاسب الالى تمام تبعا لابعاد الشاشة اما فى حالة PopUp = False يتم توسيط النماذج والتقارير فى داخل اطار برنامج الاكسس نفسه والان اليكم المرفق بالمثال العملى AutoCentre.mdb
    1 point
  3. السلام عليكم ورحمة الله تعالى وبركاته نظرا للطلب والتساؤلات الكثيرة حول الموضوع او نقاط فرعيه منه قاصدا من ذلك أن يكون الموضوع شاملا ومرجعا للراغبين فى ذلك والدراسبن اليكم بناء القاعدة والذى اتمنى على الله تعالى ان يبدأ البناء وينتهى بشكل احترافى بقدر الإمكان وسوف نبدأ من الصفر تباعا ان شاء الله سوف يتم تحديث الموضوع تباعا الموضوع بأمر الله سوف اضع له الخطوط العريضة طبقا للمؤسسة التى اعمل بها لاننى أصلا سوف اقوم بقاعدة البيانات لمؤسستى وبقدر الإمكان سوف أضع فى الحسبان ان يكون التصميم عام بقدر الإمكان ليتناسب ويتماشى مع الجميع ومع رغباتهم بقدر الإمكان اهلا بكل من يريد المشاركة فى ادراة الموضوع والافكار والتعديل او الاضافة و ...... مبدئيا خلونا نتفق وقتى ضيق فى الفترة المقبلة لما انا مقدم عليه فلذلك ارجو الاعتذار مقدما ان لم التفت الى اى تساؤلات والتى وإن حدث سوف يتم تأجيلها حتى ينتهى مشروع اعداد التطبيق لمؤسستى تماما ان شاء الله بسم الله وعلى بركة الله بداية المشروع اول شئ تصيد وتسجيل الاخطاء بجدول وده وظيفته تسجيل الحطأ باسم الحدث أو الدالة المستخدمة فى الكود عند تنفيذ امر ما ورقم الخطا وصفه للمساعدة مستقبلا فى الوقوف على اماكن الاخطاء لعمل الصيانة اللازمة طبعا تم التطرق اليه فى هذا الموضوع: ويمكنكم الذهاب اليه والمتابعة من هنا طيب حلو جدا جدا وعلشان انا هبدأ بالأكواد ملاحظات هامة جدا جدا جدا جدا لبداية صحيحة واحترافيه : كتابة كود احترافي تتطلب ممارسات جيدة واتباع مبادئ برمجية صحيحة. فيما يلي بعض النصائح التي يمكن أن تساعدك في كتابة كود احترافي: توضيح الكود: استخدم تعليقات لشرح الجزء العلوي من الكود وللأمور المعقدة. اختر أسماء مفيدة وواضحة للمتغيرات والدوال تدل على وظائفها التى تمت كتابتها من اجلها. التنظيم: استخدم الهندسة المعمارية لتنظيم البرنامج إلى وحدات صغيرة وقابلة لإعادة الاستخدام. قم بتقسيم البرنامج إلى وحدات ووظائف مستقلة. الأداء: ابتعد عن الأكواد المكررة وقدّم الأكواد القابلة لإعادة الاستخدام في وحدات. حافظ على الأداء بتجنب العمليات الزائدة غير الضرورية. اختبار الوحدات: قم بكتابة اختبارات للتأكد من أن وحدات الكود الخاصة بك تعمل كما هو متوقع. الأمان: تحقق دائمًا من صحة البيانات الواردة والخارجة من الدوال. تفادى استخدام الأكواد المعرضة لثغرات أمان. تحسين الأداء: استخدم الهندسة العكسية لتحسين الأداء. ابحث عن فرص لتحسين الكفاءة والسرعة. استخدام التعليمات البرمجية النظيفة: ابتعد عن استخدام المتغيرات العالمية عندما لا تكون ضرورية. تجنب الأكواد التي تعتمد على التبديلات الطويلة. توثيق الكود: وفر توثيقًا جيدًا للكود ليسهل على المطورين الآخرين أو نفسك فهم كيف يعمل البرنامج. متابعة المعايير: اتبع معايير البرمجة المتعارف عليها . التحسين المستمر: كن مستعدًا لتحسين الكود الخاص بك بناءً على التعلم وتغييرات متطلبات المشروع. الالتزام بتلك المبادئ يمكن أن يساعدك في كتابة كود أكثر احترافية وقابل للصيانة. حلو الكلام وكل ده هيبان بقدر المستطاع فى التعليمات البرمجية التى سوف تتم تباعا يمكنك استخدام البادئات التالية لتسمية العناصر والكائنات بشكل منظم ويجعل الشيفرة أكثر وضوحًا. البادئات تعتمد على النوع أو الدور الذي تقوم به العناصر: وعلى سبيل المثال وليس الحصر المتغيرات: int للأعداد الصحيحة. dbl للأعداد العشرية. str للنصوص. bool للقيم البولية اى True , False أو Yes , No . Dim intCounter As Integer Dim dblAmount As Double Dim strName As String Dim boolIsValid As Boolean المصفوفات: arr للمصفوفات. Dim arrNames() As String الدوال: Function للدوال التي تعيد قيمة. Sub للإجراءات (دوال بدون إرجاع قيمة). Function CalculateTotal() As Double Sub DisplayMessage() الكائنات: frm للنماذج (Forms). rpt للتقارير (Reports). tbl للجداول (Tables). qry للاستعلامات (Queries). cls للكائنات أو الفئات لتعريف الكلاسات (Classes). bas وحدات الشيفرة- الوحدات النمطية (Modules). tbl للجداول (Tables). qry للاستعلامات (Queries). Dim frmCustomer As Form Dim rptSales As Report Dim tblData As TableDef Dim qryFilteredData As QueryDef الثوابت: c للثوابت. Const cMaxValue As Integer = 100 المتغيرات العامة: g للمتغيرات العامة. Public gCounter As Integer المتغيرات المؤقتة: temp للمتغيرات المؤقتة. Dim tempValue As Integer التعليقات: REM لتعليقات الشيفرة. REM هذا تعليق لشرح الشيفرة الأشكال والعناصر الرسومية: btn للأزرار (Buttons). lbl للتسميات (Labels). txt لحقول النص (Textboxes). chk لمربعات الاختيار (Checkboxes). القوائم والمراقبين: cmb لقائمة الاختيار (Comboboxes). lst لقوائم الاختيار (Listboxes). cb لمراقبات الصندوق (Checkboxes). الكائنات الأخرى: app لكائن التطبيق (Application). cnn لكائن الاتصال (Connection). doc لكائن المستند (Document). الحقول والأعمدة: fld لحقول البيانات (Fields). col لعمود البيانات (Column).
    1 point
  4. برنامج صغير لاعمال السنة للصفوف الرابع والخامس والسادس البرنامج لمساعدة العاملين بكنترول المرحلة الابتدائية لاستخراج ال 70 درجة بسهولة وتم عمل البرنامج تسهيلا علي السادة الزملاء في الكنترول كلمة مرور فتح المعادلات : 123 ولا داعي لاستخدامها الا في الضرورة حتى لا يتم العبث بالمعادلات الموجودة بالبرنامج او حذفها اعمال السنة ترم اول2023_2024.xlsb
    1 point
  5. السلام عليكم ورحمة الله جرب المرفق لعل فيه ما تريد... ورقة عمل Microsoft Excel جديد.xlsx
    1 point
  6. اخي Foksh اخي طول بالك علي والله صحكت موت ع الشكل هذا مثل الانسان المهموم وانا مثله والله مهموم من هذا الطلب ابا حل له - حاولت اقسم القاعده وارفعها لك على الميديا فاير ما استوى حاولت بكل الطرق ما فيه فايدة اذا فيه حل كان بها واذا مافية الله كريم ولكن املي في الله كبير ثم انتو السادة المشرفين المبرمجين الفاهمين - نحن ع قد حالنا مبديين بارك الله فيك وفي ربعك السوال : ابا عند ادخال من تاريخ 1/12/2012 الى 1/12/2026 فقط ابا البطاقات المنتهية في التقرير ولاتطلع البطاقات الفعالة لغاية يومنا هذا ابا عند ادخال من تاريخ 1/12/2012 الى 1/1/2026 فقط ابا البطاقات الفعالة لغاية السنوات القادمة 2026 او 2027 الى الخ بشرط ما تطلع البطاقات المنتهية وجزاكم الله خير
    1 point
  7. عليكم السلام بناء على المرفق .. وبناء على الصورة المرفقة يجب تأسيس جدول Eva_details بالشكل الصحيح اضافة حقلين .. بل ثلاثة الأول : لنوع الشخص الذي يشمله هذا البند .. واعتقد انك عملته ولكن اجعل القيمة ارقام 1 ، 2 ، 3 للمدير وللموظف وللفرد في هذه الحالة عندما تريد تقييم شخص لا يظهر لك الا البنود الخاصة به الثاني : حقل او عمود لنوع الهدف وايضا تكون القيمة ارقام 1 ، 2 ، 3 .. الانتاج والانضباط والصفات الشخصية في هذه الحالة وفي نموذج التقييم ... عندما تختار من مربع التحرير الهدف تظهر لك بنود الهدف نفسه فقط لتقيييمها الثالث : انت بحاجة لإعطاء قيمة للبند بحيث يكون مجموع بنود الممتاز = 100 ... كل نوع حسب بنوده
    1 point
  8. جرب هدا الحل هل يناسبك هيثم -2.xlsx
    1 point
  9. عليكم السلام في الاستعلام استبدل last بــــــ first ايضا يوجد طرق اخرى لتحقيق طلبك .. تختلف عن عرضك
    1 point
  10. لك بالغ الشكر والتقدير عمل جميل ومبدع .. بارك الله فيك انا على يقين باذن الله تعالى بانكم لن تبخلوا علينا بأي معلومة مفيدة باذن الله وفقكم الله ..
    1 point
  11. الله يفتح عليك وربنا يبارك فيك وفي أمثالك
    1 point
  12. Version 3.0.0

    1,026 تنزيل

    بسم الله الرحمن الرحيم أضع بين أيديكم برنامج :: (( مكتبة الأكواد الخاصة )) :: وهو عبارة عن حافظة شخصية للأكواد والملفات الخاصة بمبرمج الأكسس أو أي مبرمج آخر .. البرنامج به كم لا بأس به من الأكواد التي كنت أستخدمها في تصميم البرامج، بعضها من إبداعات الإخوة في الموقع وبعضها من مصادر أخرى.. من مميزات البرنامج خاصية البحث السريع للوصول للأكواد بسهولة .. وفيه تقسيمات للأكواد المجربة وغير المجربة .. وكذلك يمكن الإشارة للمرجع الذي تم أخذ الأكواد منه .. وأيضا يمكن حفظ الملفات المرتبطة والأمثلة في مجلدات قرينة بالبرنامج 🙂 البرنامج مفتوح المصدر ويمكن لك أن تغير فيه ما تشاء ليلبي احتياجاتك الشخصية .. 🌷 :: تحياتي :: 🌷 🙂 :: ولا تنسوني من صالح دعواتكم :: 🙂
    1 point
  13. البيانات الرئيسية والتى نريد تحضيرها مرة واحدة فقط عند بدء التطيق لنتمكن من استخدامها فى زوايا التطبيق المختلفة على سبيل المثال وليس الحصر نريد اسم الشركة دائما فى كل التقارير مثلا عند تحقق شرط معين بيانات الاتصال بالمصمم لعمل ذلك نقوم ببناء جدول ليكون اسمه tblGlobalInformation بناء الجدول يعتمد على حقلين itemName , itemValue والان وحدة نمطية جديدة ليكون اسمها = basGlobalInformation فى الوحدة النمطية نقوم بعمل Enumeration هي كلاسات خاصة تستخدم لتعريف ثوابت محددة مسبقا وتستخدم لتخزين عناصر متتالية دفعة واحدة بعدها يمكنه إرجاع هذه العناصر واحدا تلو الآخر حسب الحاجة الاكواد داخل الوحدة النمطية basGlobalInformation Option Compare Database Option Explicit ' Enumeration defining global information indices Public Enum EnumInformation EnumStartIndex ' Enumeration values for global information start infSoftwarName infSoftwarVersion infDesignCompany infDesigerName infDesigerMail infDesigerPhone infCompanyName infCompanyGM EnumEndIndex = infCompanyGM ' Enumeration value for global information end End Enum ' Array to store global information values Public Ginf() As String ' Public variables to store individual global information values Public GetSoftwarName As String Public GetSoftwarVersion As String Public GetDesignCompany As String Public GetDesigerName As String Public GetDesigerMail As String Public GetDesigerPhone As String Public GetCompanyName As String Public GetCompanyGM As String ' The name of the table Global Information Public Const TableGlobalInformationName As String = "tblGlobalInformation" Function IsArrayInitialized(arr As Variant) As Boolean ' Check if the array is initialized (not empty or uninitialized) On Error Resume Next IsArrayInitialized = (UBound(arr) >= LBound(arr)) On Error GoTo 0 End Function Public Sub SetGlobalVariables() ' Procedure to set global variables based on database values On Error Resume Next ' Open a recordset based on the SQL query Dim db As DAO.Database Dim rs As DAO.Recordset Dim strSQL As String Set db = CurrentDb ' Check if the table exists in the database If Not IsTableExists(TableGlobalInformationName, db) Then Exit Sub ' Check if global information values are already populated If Not IsArrayInitialized(Ginf) Then ' Resize the global information values array based on the count of enumeration items ReDim Ginf(1 To EnumEndIndex - EnumStartIndex) As String ' Create a SQL query to retrieve all required items in one go strSQL = "SELECT itemName, itemValue FROM " & TableGlobalInformationName & " WHERE itemName " & _ "IN ('SoftwarName', 'SoftwarVersion', 'DesignCompany', 'DesigerName', " & _ "'DesigerMail', 'DesigerPhone', 'CompanyName', 'CompanyGM');" ' Open a recordset based on the SQL query Set rs = db.OpenRecordset(strSQL) ' Loop through the recordset and assign values to global information values array Do While Not rs.EOF Dim itemName As String itemName = rs.Fields("itemName").Value Dim itemIndex As Integer itemIndex = GetInfoIndex(itemName) If itemIndex <> -1 Then Ginf(itemIndex) = rs.Fields("itemValue").Value Else Debug.Print "ItemName: " & itemName & " not found in EnumInf." End If rs.MoveNext Loop ' Assign individual global information values to public variables GetSoftwarName = Ginf(EnumInformation.infSoftwarName) GetSoftwarVersion = Ginf(EnumInformation.infSoftwarVersion) GetDesignCompany = Ginf(EnumInformation.infDesignCompany) GetDesigerName = Ginf(EnumInformation.infDesigerName) GetDesigerMail = Ginf(EnumInformation.infDesigerMail) GetDesigerPhone = Ginf(EnumInformation.infDesigerPhone) GetCompanyName = Ginf(EnumInformation.infCompanyName) GetCompanyGM = Ginf(EnumInformation.infCompanyGM) ' Close the recordset rs.Close Set rs = Nothing End If ' Handle errors If Err.Number <> 0 Then ' Handle error If Err.Number = 94 Then Exit Sub ' Handle the error (display a message) Call ErrorLog(Err, Error$, "basEnumInformationrmation : SetGlobalVariables") Err.Clear End If On Error GoTo 0 End Sub Function GetInfoIndex(itemName As String) As Integer ' Helper function to get the index of an item in the EnumInformation enumeration Select Case itemName Case "SoftwarName" GetInfoIndex = EnumInformation.infSoftwarName Case "SoftwarVersion" GetInfoIndex = EnumInformation.infSoftwarVersion Case "DesignCompany" GetInfoIndex = EnumInformation.infDesignCompany Case "DesigerName" GetInfoIndex = EnumInformation.infDesigerName Case "DesigerMail" GetInfoIndex = EnumInformation.infDesigerMail Case "DesigerPhone" GetInfoIndex = EnumInformation.infDesigerPhone Case "CompanyName" GetInfoIndex = EnumInformation.infCompanyName Case "CompanyGM" GetInfoIndex = EnumInformation.infCompanyGM End Select End Function طيب بما اننا نتكلم عن اعدادات مهمة لابد من تحقيقها عند بدء التطبيق سوف نقوم بعمل وحدة نمطية باسم basInitialization ونضع بها الاكواد الاتية Rem Subroutine to initialize the application Sub InitializeApplication() Rem Initialize the error log table if it doesn't exist If Not IsErrorLogTableInitialized() Then CreateErrorLogTable Rem Call the function to set global variables. SetGlobalVariables End Sub ونقوم بعمل نموذج البدء ليكون اسمه frmInitialization فى هذا النموذج نستدعى الدالة السابقة فى حدث عند تحميل النموذج بالشكل التالى Private Sub Form_Load() On Error Resume Next Rem Set the initial time as the interval for the timer Rem Initialize the application when the startup form is loaded. InitializeApplication Rem Add calls to the initialized special functions through which you want the database to be booted Rem Or add specify the codes through which you would like to process the data later according to the requirements of your design Rem Set the current procedure name (you can adjust the procedure name as needed) If Err.Number <> 0 Then Rem Clear the error Err.Clear End If End Sub يتبع ... واخيرا المرفق HRManagement V 1.0.0.accdb
    0 points
×
×
  • اضف...

Important Information