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

ابو جودي

أوفيسنا
  • Posts

    6,935
  • تاريخ الانضمام

  • Days Won

    195

Community Answers

  1. ابو جودي's post in هل يمكن دمج عنوان مشترك لعمودين مختلفين ؟ was marked as the answer   
    اتفضل 

     
    1.accdb
  2. ابو جودي's post in تكرار السجل الحالى was marked as the answer   
    مش عارف انا عارف افهمك واللا لاء
    جرب استخدام الاكواد التاليه
    Sub DuplicateRecords() Dim db As DAO.Database Dim rs As DAO.Recordset Dim newPCode As Long Dim todayDate As Date Dim sqlInsertLab As String Dim sqlInsertRequest As String Dim sqlInsertTests As String ' فتح قاعدة البيانات الحالية Set db = CurrentDb() todayDate = Date ' جلب آخر PCode من جدول tbl_NewLab لتجنب التكرار Set rs = db.OpenRecordset("SELECT MAX(PCode) AS MaxPCode FROM tbl_NewLab") If Not rs.EOF Then newPCode = rs!MaxPCode + 1 Else newPCode = 1 ' في حالة عدم وجود سجلات End If rs.Close ' استبدال المرجع بالصيغة الصحيحة Dim currentPCode As Long currentPCode = Forms!New_Project!newRequest.Form!PCode ' إدراج السجل الجديد في tbl_NewLab sqlInsertLab = "INSERT INTO tbl_NewLab (DDate, PCode, Pname, Name_Month, C_Year, Area, Code_Month, Mon_Year) " & _ "SELECT #" & todayDate & "#, " & newPCode & ", Pname, Name_Month, C_Year, Area, Code_Month, Mon_Year " & _ "FROM tbl_NewLab WHERE PCode = " & currentPCode db.Execute sqlInsertLab ' إدراج السجل الجديد في tbl_NewRequest sqlInsertRequest = "INSERT INTO tbl_NewRequest (PCode, TCode, Date_R, Price_R, Tname_R) " & _ "SELECT " & newPCode & ", TCode, #" & todayDate & "#, Price_R, Tname_R " & _ "FROM tbl_NewRequest WHERE PCode = " & currentPCode db.Execute sqlInsertRequest ' إدراج السجل الجديد في tbl_NewTests (إذا لزم الأمر) sqlInsertTests = "INSERT INTO tbl_NewTests (TCode, TName, Price) " & _ "SELECT TCode, TName, Price " & _ "FROM tbl_NewTests WHERE TCode IN (SELECT TCode FROM tbl_NewRequest WHERE PCode = " & currentPCode & ")" db.Execute sqlInsertTests MsgBox "تم تكرار السجل بنجاح مع تحديث PCode والتاريخ.", vbInformation End Sub Private Sub أمر4030_Click() DuplicateRecords End Sub  
  3. ابو جودي's post in برنامج او السورس لمكتبة كتب was marked as the answer   
    ابدا فى وضع التحليل المناسب والتصور الامثل لاحتياجات وابدأ فى انشاء قاعدة البيانات وفقا لذلك ان تعثرت فى تنفيذ اى شئ ارجع الى الموضوع واسال وان شاء الله تجد الدعم المناسب
    ودعنى اضع لك اللبنة الاولى بشكل عام  ولكن قد تكون مخالفة لمتطلباتك او رغباتك او الية العمل لذلك خذ فكرة مما اعرضه عليه فذلك سوف يفتح لك افاق التصور والتخيل الصحيح ليضعك على البداية الصحيحة للمسار الامثل لانشاء قاعدة بياناتك
    1. الجداول (Tables)
    أ. جدول الكتب (Books)
    الحقول:
    BookID: مفتاح أساسي (رقمي تلقائي). Title: عنوان الكتاب (نصي). Author: اسم المؤلف (نصي). ISBN: رقم ISBN (نصي، فريد). Publisher: الناشر (نصي). PublicationYear: سنة النشر (تاريخ). GenreID: مفتاح خارجي (يرتبط بجدول التصنيفات). Language: اللغة (نصي). TotalCopies: عدد النسخ الإجمالي (رقمي). AvailableCopies: عدد النسخ المتاحة (رقمي). ShelfLocation: موقع الكتاب على الرف (نصي). ملاحظات إضافية:
    إذا كان لديك مؤلفون متعددون لنفس الكتاب، يمكن فصل المؤلفين إلى جدول مستقل (Authors) مع جدول وسيط (BookAuthors). إضافة حقل مثل BookDescription لتقديم وصف موجز عن الكتاب قد يكون مفيدًا.  
    ب. جدول الأعضاء (Members)
    الحقول:
    MemberID: مفتاح أساسي (رقمي تلقائي). FirstName: الاسم الأول (نصي). LastName: الاسم الأخير (نصي). Email: البريد الإلكتروني (نصي، فريد). Phone: رقم الهاتف (نصي). Address: العنوان (نصي). MembershipDate: تاريخ الانضمام (تاريخ). Status: حالة العضوية (نشيط/غير نشيط، نصي أو منطقي). ملاحظات إضافية:
    يمكن إضافة حقل MembershipType لتحديد نوع العضوية (مثل عادية أو مميزة). حقل Notes قد يكون مفيدًا لتسجيل أي ملاحظات إضافية.  
    ج. جدول الإعارات (Borrowings)
    الحقول:
    BorrowID: مفتاح أساسي (رقمي تلقائي). MemberID: مفتاح خارجي يرتبط بجدول الأعضاء. BookID: مفتاح خارجي يرتبط بجدول الكتب. BorrowDate: تاريخ الإعارة (تاريخ). DueDate: تاريخ الاستحقاق (تاريخ). ReturnDate: تاريخ الإرجاع (تاريخ). Status: حالة الإعارة (معارة/مرجعة/متأخرة). ملاحظات إضافية:
    يمكن إضافة حقل FineAmount لتسجيل الغرامة عند تأخر الإرجاع.  
    د. جدول التصنيفات (Genres)
    الحقول:
    GenreID: مفتاح أساسي (رقمي تلقائي). GenreName: اسم التصنيف (نصي).  
    2. العلاقات بين الجداول (Relationships)
    العلاقات:
    Books.GenreID ↔ Genres.GenreID: علاقة واحد إلى متعدد. Borrowings.MemberID ↔ Members.MemberID: علاقة واحد إلى متعدد. Borrowings.BookID ↔ Books.BookID: علاقة واحد إلى متعدد. ملاحظات:
    تأكد من تعريف العلاقات في Access وربط الجداول بمفاتيحها الأساسية. قم بتمكين التكامل المرجعي (Referential Integrity) لتجنب إدخال بيانات غير متطابقة.  
    3. تحسينات إضافية
    جدول المؤلفين (Authors)اختياري: AuthorID: مفتاح أساسي. AuthorName: اسم المؤلف. ثم إنشاء جدول وسيط BookAuthors:
    BookID: مفتاح خارجي من جدول الكتب. AuthorID: مفتاح خارجي من جدول المؤلفين. جدول الغرامات (Fines): FineID: مفتاح أساسي. BorrowID: مفتاح خارجي من جدول الإعارات. FineAmount: مبلغ الغرامة. واجهة المستخدم (Forms): إنشاء واجهات سهلة الاستخدام لإضافة الكتب، إدارة الأعضاء، وتتبع الإعارات. إضافة تقارير لإحصائيات المكتبة (مثل الكتب الأكثر استعارة). الاستعلامات (Queries): استعلام لتحديد الكتب المتأخرة عن الإرجاع. استعلام لتقرير الأعضاء النشطين.  
  4. ابو جودي's post in مطلوب تقسيم رقم الي 6 أعمدة was marked as the answer   
    اتفضل 
     
     
    ss (2Saad-1).zip
  5. ابو جودي's post in استدعاء العشرة الأوائل was marked as the answer   
    وده المرفق للتطبيق 
    ومعاك فكرتين 
    الاولى التى تعتمد على الاكواد
    والثانية التى تعتمد على الاستعلام
     

     
    dodo - 2.zip
  6. ابو جودي's post in مطلوب جلب بيانات من جدول لجدول آخر وفق اختيار من قائمة was marked as the answer   
    اتفضل

     
     
    Database9.accdb
  7. ابو جودي's post in امكانية عرض صورة شخصية مدمجة مع بيانات الشخص من خلال رمز Qrcode was marked as the answer   
    الحد الأقصى لطول السلسلة النصية التي يمكن تحويلها إلى رمز استجابة سريع (QR Code) يعتمد على عدة عوامل:
    إصدار QR Code (Version). مستوى تصحيح الخطأ (Error Correction Level). نوع البيانات (Data Mode).  
    1. إصدار QR Code (Version):
    هناك 40 إصدارًا من: QR Code من الإصدار 1 إلى الإصدار 40. كل إصدار له عدد مختلف من الوحدات (Modules) التي تحدد سعة البيانات. الإصدار 1 هو الأصغر  21x21 وحدة ، بينما الإصدار 40 هو الأكبر  177x177 وحدة .  
    2. مستوى تصحيح الخطأ (Error Correction Level):
    يحدد مستوى تصحيح الخطأ مقدار البيانات الإضافية التي يتم إضافتها لاستعادة المعلومات في حالة تلف جزء من QR Code. هناك أربعة مستويات:
    المستوى
    نسبة تصحيح الخطأ
    السعة النسبية
    L (Low)
    ~7%
    الأعلى
    M (Medium)
    ~15%
    متوسط
    Q (Quartile)
    ~25%
    أقل
    H (High)
    ~30%
    الأقل
    كلما زاد مستوى تصحيح الخطأ، قلت سعة البيانات التي يمكن تخزينها.
     
     
     
    3. نوع البيانات (Data Mode):
    يحدد نوع البيانات كيفية ترميز المعلومات في QR Code. الأنواع الرئيسية هي:
    النوع
    الوصف
    السعة النسبية
    Numeric
    أرقام فقط (0-9)
    الأعلى
    Alphanumeric
    أرقام وحروف وأحرف خاصة محددة (مثل $, %)
    متوسط
    Byte
    أي بيانات ثنائية (مثل UTF-8)
    أقل
    Kanji
    أحرف يابانية
    الأقل
     
    الحدود القصوى لسعة البيانات:
    بناءً على الإصدار ومستوى تصحيح الخطأ ونوع البيانات، إليك الحدود القصوى التقريبية:
    الإصدار
    Numeric
    Alphanumeric
    Byte
    Kanji
    1
    41
    25
    17
    10
    10
    652
    395
    271
    167
    20
    1,391
    845
    579
    358
    40
    7,089
    4,296
    2,953
    1,817
    Numeric: أرقام فقط. Alphanumeric: أرقام وحروف وأحرف خاصة. Byte: أي بيانات ثنائية (مثل Base64). Kanji: أحرف يابانية.
  8. ابو جودي's post in تعديل على طريقة ظهور الباركود في النموذج was marked as the answer   
    تدلل 
    وتم تعديل المرفق لدعم النواتان  32, 64 
    علشان بعد كده محدش يقول لك انا لدى 64 بت   كده محدش يبقال له حجه تانى 
    تنويه انا لم اغير فى الية التصميم شئ 
    لكن ممكن نستغنى عن مربع النص : str_Text

    ونضع التحقق التالى قى الكود
    If Len(Trim(Nz([CardNumber], ""))) = 0 Or Len(Trim(Nz([Date1], ""))) = 0 Then بدلا من 
    If IsNull(Me.str_Text) Or IsEmpty(Me.str_Text) Or Len(Trim(Nz(Me.str_Text, ""))) = 0 Then
    وطبعا ممكن تستدعى الدالة : CreateAndDisplayQRCode 
    عند اضافة سجل جديد فى الحدث بعد تحديث مربع النص الخاص بالتاريخ وكذلك رقم الهوية 
    لضمان عمل الملف فى حالة تم ادخال بيانات اى حقل قبل الاخر 
    والتعديلات بالاستغناء عن مربع النص : str_Text
    تجدها فى التعديل الثانى :  zint QR 3- update (2)
     
    zint QR 3- update.zip zint QR 3- update (2).zip
  9. ابو جودي's post in كيف يمكن جعل كلمة السر على شكل نجوم was marked as the answer   
    مبدئيا اعمل وحدة نمطية جديدة وسميها مثلا: basInputBoxWithMask
    ضع الاكواد الاتية بالوحدة النمطية
    Option Compare Database Option Explicit '********************************************************************** ' Module: MaskedInputBox ' Purpose: This module provides functionality to create an InputBox ' with masked input, displaying characters as asterisks (*) ' typically used for password entry. ' ' API Declarations: ' - CallNextHookEx: Passes the hook information to the next hook procedure in the current hook chain. ' - GetModuleHandle: Retrieves a module handle for the specified module. ' - SetWindowsHookEx: Installs a hook procedure into the hook chain. ' - UnhookWindowsHookEx: Removes a hook procedure installed in a hook chain. ' - SendDlgItemMessage: Sends a message to a control in a dialog box. ' - GetClassName: Retrieves the name of the class to which the specified window belongs. ' - GetCurrentThreadId: Retrieves the thread identifier of the calling thread. ' ' Constants: ' - EM_SETPASSWORDCHAR: Used to specify the character to be displayed when text is entered in a password field. ' - WH_CBT: Hook type for monitoring and modifying Computer-Based Training (CBT) events. ' - HCBT_ACTIVATE: Hook code that is sent when a window is about to be activated. ' - HC_ACTION: Indicates a valid action has taken place, allowing processing to continue. ' ' Author: Officena.net, Mohammed Essm, soul-angel@msn.com ' Date: August 2024 '********************************************************************** #If VBA7 Or Win64 Then Private Declare PtrSafe Function CallNextHookEx Lib "user32" (ByVal hHook As LongPtr, ByVal nCode As Long, ByVal wParam As LongPtr, ByVal lParam As Any) As LongPtr Private Declare PtrSafe Function GetModuleHandle Lib "kernel32" Alias "GetModuleHandleA" (ByVal lpModuleName As String) As LongPtr Private Declare PtrSafe Function SetWindowsHookEx Lib "user32" Alias "SetWindowsHookExA" (ByVal idHook As Long, ByVal lpfn As LongPtr, ByVal hmod As LongPtr, ByVal dwThreadId As Long) As LongPtr Private Declare PtrSafe Function UnhookWindowsHookEx Lib "user32" (ByVal hHook As LongPtr) As Long Private Declare PtrSafe Function SendDlgItemMessage Lib "user32" Alias "SendDlgItemMessageA" (ByVal hDlg As Long, ByVal nIDDlgItem As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long Private Declare PtrSafe Function GetClassName Lib "user32" Alias "GetClassNameA" (ByVal hwnd As Long, ByVal lpClassName As String, ByVal nMaxCount As Long) As Long Private Declare PtrSafe Function GetCurrentThreadId Lib "kernel32" () As Long #Else Private Declare Function CallNextHookEx Lib "user32" (ByVal hHook As Long, ByVal nCode As Long, ByVal wParam As Long, ByVal lParam As Any) As Long Private Declare Function GetModuleHandle Lib "kernel32" Alias "GetModuleHandleA" (ByVal lpModuleName As String) As Long Private Declare Function SetWindowsHookEx Lib "user32" Alias "SetWindowsHookExA" (ByVal idHook As Long, ByVal lpfn As Long, ByVal hmod As Long, ByVal dwThreadId As Long) As Long Private Declare Function UnhookWindowsHookEx Lib "user32" (ByVal hHook As Long) As Long Private Declare Function SendDlgItemMessage Lib "user32" Alias "SendDlgItemMessageA" (ByVal hDlg As Long, ByVal nIDDlgItem As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long Private Declare Function GetClassName Lib "user32" Alias "GetClassNameA" (ByVal hwnd As Long, ByVal lpClassName As String, ByVal nMaxCount As Long) As Long Private Declare Function GetCurrentThreadId Lib "kernel32" () As Long #End If ' Constants to be used in our API functions Private Const EM_SETPASSWORDCHAR = &HCC Private Const WH_CBT = 5 Private Const HCBT_ACTIVATE = 5 Private Const HC_ACTION = 0 #If VBA7 Or Win64 Then Private hHook As LongPtr #Else Private hHook As Long #End If '********************************************************************** ' Function: NewProc ' Purpose: This function is the hook procedure that processes CBT ' events, specifically to mask input characters in an InputBox. ' Inputs: ' - lngCode: The code of the event (Long). ' - wParam: A handle to the window related to the event (Long). ' - lParam: Pointer to an event-specific structure (Long). ' Returns: - LongPtr: The result from the next hook procedure or 0 if handled. ' Notes: ' - Only processes events with code >= HC_ACTION. ' - Checks for dialog box activation and sets the password character. ' ' Author: Officena.net, Mohammed Essm, soul-angel@msn.com ' Date: August 2024 '********************************************************************** Public Function NewProc(ByVal lngCode As Long, ByVal wParam As Long, ByVal lParam As Long) As LongPtr Dim strClassName As String Dim lngBuffer As Long Dim result As Long ' Proceed only if the message code is an action code If lngCode < HC_ACTION Then NewProc = CallNextHookEx(hHook, lngCode, wParam, lParam) Exit Function End If ' Get the class name of the window being activated strClassName = String$(256, " ") lngBuffer = 255 If lngCode = HCBT_ACTIVATE Then result = GetClassName(wParam, strClassName, lngBuffer) ' Check if the class name is a dialog box ("#32770") If Left$(strClassName, result) = "#32770" Then ' Set the character for password masking SendDlgItemMessage wParam, &H1324, EM_SETPASSWORDCHAR, Asc("*"), &H0 End If End If ' Call the next hook in the chain and return its value NewProc = CallNextHookEx(hHook, lngCode, wParam, lParam) End Function '********************************************************************** ' Function: InputBoxDK ' Purpose: Displays an InputBox with masked input, showing each character ' as an asterisk (*) instead of the actual character. ' Inputs: ' - Prompt: The prompt string displayed in the InputBox (String). ' - Optional Title: The title of the InputBox window (String). ' - Optional Default: The default string displayed in the InputBox (String). ' - Optional XPos: The x-coordinate of the InputBox (Long). ' - Optional YPos: The y-coordinate of the InputBox (Long). ' - Optional HelpFile: The name of the Help file for the InputBox (String). ' - Optional Context: The Help context number for the InputBox (Long). ' Returns: - String: The string entered by the user in the InputBox. ' Notes: ' - Hooks into the CBT events to mask the input as the user types. ' - The hook is removed after the InputBox is closed to prevent resource leaks. ' ' Author: Officena.net, Mohammed Essm, soul-angel@msn.com ' Date: August 2024 '********************************************************************** Public Function InputBoxDK(Prompt As String, Optional Title As String, Optional Default As String, Optional XPos As Long, Optional YPos As Long, Optional HelpFile As String, Optional Context As Long) As String On Error GoTo ExitProperly Dim lngModHwnd As LongPtr Dim lngThreadID As Long ' Get the current thread ID and module handle lngThreadID = GetCurrentThreadId lngModHwnd = GetModuleHandle(vbNullString) ' Set the hook for CBT (Computer-Based Training) to monitor and modify dialog box creation hHook = SetWindowsHookEx(WH_CBT, AddressOf NewProc, lngModHwnd, lngThreadID) ' Show the InputBox InputBoxDK = InputBox(Prompt, Title, Default, XPos, YPos, HelpFile, Context) ExitProperly: ' Ensure the hook is removed to prevent resource leaks If hHook <> 0 Then UnhookWindowsHookEx (hHook) End Function  
    بالنسبة للنموذج دى الاكواد 
    وطبعا لا انصح باستخدام اللغة العربية داخل المحرر 
     
    Option Compare Database Option Explicit Private Sub Command4_Click() DoCmd.GoToRecord , , acNewRec End Sub '********************************************************************** ' Subroutine: Checkbox_AfterUpdate ' Purpose: Toggles the InputMask property of a password input field based on the state of a checkbox. ' When the checkbox is checked, the password is displayed as plain text; ' when unchecked, the password is masked with the "Password" mask. ' Inputs: ' - None (uses the current state of the form's controls). ' Outputs: ' - None (modifies the InputMask property of the "pass" control). ' Notes: ' - This subroutine assumes that "Checkbox" is a control on the form and is tied to ' the user's action of toggling the checkbox. ' - If the checkbox is checked (True), the password will be shown in plain text. ' - If unchecked (False), the password will be masked. ' ' Author: Officena.net, Mohammed Essm, soul-angel@msn.com ' Date: August 2024 '********************************************************************** Private Sub Checkbox_AfterUpdate() ' Check the value of the checkbox and update the InputMask of the "pass" field accordingly If Me.Checkbox.Value = True Then Me.pass.InputMask = "" ' Show the password as plain text Else Me.pass.InputMask = "Password" ' Mask the password with the "Password" input mask End If End Sub '********************************************************************** ' Subroutine: jop_AfterUpdate ' Purpose: Validates the job role entered by the user and enforces role-specific constraints. ' If the job role is "مستخدم" (User), it checks if the maximum allowed number of ' users has been reached. If so, it prompts for a password to allow adding more users. ' Inputs: ' - None (uses the current state of the form's controls). ' Outputs: ' - None (may prevent form submission based on validation checks). ' Notes: ' - The subroutine assumes "jop" is a control on the form where the user selects their job role. ' - If the job role is not "محاسب" (Accountant) or "مستخدم" (User), an error message is shown, ' and the action is canceled. ' - If the job role is "مستخدم", the subroutine checks the number of existing users in the database. ' If there are already 3 users, the subroutine prompts for a password before allowing more users to be added. ' - The password required to add more users is hardcoded as "123". This should be secured in a production environment. ' ' Author: Officena.net, Mohammed Essm, soul-angel@msn.com ' Date: August 2024 '********************************************************************** Private Sub jop_BeforeUpdate(Cancel As Integer) Dim db As DAO.Database Dim rs As DAO.Recordset Dim UserCount As Integer Dim PasswordInput As String ' Get the current database Set db = CurrentDb() ' Validate the job role entered by the user If Me.jop.Value <> "محاسب" And Me.jop.Value <> "مستخدم" Then MsgBox "برجاء إدخال كلمة محاسب أو مستخدم فقط.", vbExclamation, "قيمة غير صحيحة" Cancel = True Exit Sub End If ' If the job role is "مستخدم", check the number of existing users If Me.jop.Value = "مستخدم" Then Set rs = db.OpenRecordset("SELECT COUNT(*) AS CountOfUsers FROM tblUsers WHERE jop = 'مستخدم'") UserCount = rs!CountOfUsers ' If the maximum number of users has been reached, prompt for a password If UserCount >= 3 Then PasswordInput = InputBoxDK("لقد تم إدخال 3 سجلات لمستخدمين. يرجى إدخال كلمة السر لإضافة مستخدم جديد:") ' Validate the entered password If PasswordInput = "" Or PasswordInput <> "123" Then MsgBox "كلمة السر غير صحيحة. لا يمكن إضافة مستخدم جديد.", vbExclamation Cancel = True End If End If rs.Close Set rs = Nothing End If ' Clean up Set db = Nothing End Sub  
  10. ابو جودي's post in استفسار عن كود فتح النموذج اكثر من مرة في نفس الوقت was marked as the answer   
    النماذج الفرعية:
    لكل نسخة من النموذج AccTree سيكون هناك نسخة مستقلة من النماذج الفرعية
    التلاعب بالقيم:
    يؤثر فقط على النسخة التي تعمل عليها
    clnClient.Add:
    يستخدم لتخزين النماذج المفتوحة بحيث يمكن الوصول إليها لاحقا باستخدام معرف النافذة
    المتغيرات:
    يمكن استخدام نفس المتغير لإدارة جميع النماذج أو يمكن تعريف متغيرات منفصلة حسب الحاجة

     
  11. ابو جودي's post in برنامج إيقاف ميزة الـ Shift فى أى قاعدة بيانات محتاج بعض التعديلات was marked as the answer   
    جرب المرقق ده 
    https://www.officena.net/ib/applications/core/interface/file/attachment.php?id=229962&key=6be4aebe1bd6693b595feff8e00d6e1f
  12. ابو جودي's post in التحكم فى عدد المستخدمين والوظيفة عند الادخال was marked as the answer   
    Private Sub jop_BeforeUpdate(Cancel As Integer) Dim db As DAO.Database Dim rs As DAO.Recordset Dim UserCount As Integer Dim PasswordInput As String Set db = CurrentDb() If Me.jop.Value <> "محاسب" And Me.jop.Value <> "مستخدم" Then MsgBox "برجاء إدخال كلمة محاسب أو مستخدم فقط.", vbExclamation, "قيمة غير صحيحة" Cancel = True Exit Sub End If If Me.jop.Value = "مستخدم" Then Set rs = db.OpenRecordset("SELECT COUNT(*) AS CountOfUsers FROM tblUsers WHERE jop = 'مستخدم'") UserCount = rs!CountOfUsers If UserCount >= 3 Then PasswordInput = InputBox("لقد تم إدخال 3 سجلات لمستخدمين. يرجى إدخال كلمة السر لإضافة مستخدم جديد:") If PasswordInput = "" Or PasswordInput <> "123" Then MsgBox "كلمة السر غير صحيحة. لا يمكن إضافة مستخدم جديد.", vbExclamation Cancel = True End If End If rs.Close Set rs = Nothing End If Set db = Nothing End Sub  
  13. ابو جودي's post in نقل اسم وصف الزر عند الضغط إلى حقل نصي was marked as the answer   
    اعتقد يقصد الـتسمية " Caption "

    والحل فى وحدة نمطية عامة
    Public Function CopyCaptionToTextBox(TextBoxName As String) Dim ctrl As Control Set ctrl = Screen.ActiveControl If TypeOf ctrl Is CommandButton Then Forms(ctrl.Parent.Name).Controls(TextBoxName).Value = ctrl.Caption End If End Function للاستدعاء على اكثر من زر 
    اولا تحديد كل الازرار التى نريد منها تنفيذ هذا الاجراء

    والاستدعاء يتم بكتابة الكود بالشكل التالى فى الحدث عند الضغط
    طبعا مع تغيير YouTextBoxNameInForm باسم مربع النص الموجود فى النموذج 
     
    =CopyCaptionToTextBox("YouTextBoxNameInForm")  

     
     
     
    المرفق بعد التعديل 
     
    RR.accdb
  14. ابو جودي's post in اظهار البيانات عند الاختيار من مربع تحرير وسرد was marked as the answer   
    اتفضل يا سيدى  
     
    1234.accdb
  15. ابو جودي's post in كيف تم عمل هذة القائمة قائمة السياق ( القائمة المختصرة - Shortcut menu ) was marked as the answer   
    منتظر بلهفة مشتاق
    ربما اكون  لك داعما فى تجميع الافكار اهديكم بنات افكارى فى المشاركة التالية التى سوف انوه عنها لاحقا فى نهاية هذه المشاركة
     
    وانت يا استاذ يوسف 
    اليك الحل من وجهة نظرى المتواضعة ليسهل نقل الاكواد الى اى قاعدة

    تقريبا جمعت كل الاكواد الممكنة فى موديول واحد وانظر بنفسك الى المرفق فى : 
    المشاركة الآتية من هنا
     
    افدم اعتذارى لفتح موضوع جديد ليكون شامل وواف بالشرح ليكون اثراء ومرجعا يسهل العثور عليه
  16. ابو جودي's post in محتاج شاشة رئيسية متقدمة was marked as the answer   
    سوف اقدم اليك النصح وانا اقل طويلب علم بالمنتدى 
    ضع نصب عينيك دائما وابدا وبوجه خاص مع الاكسس البساطة قدر الامكان لانه صدقنى وعندما تكون البيانات اولا قليلة او قد يتتطلب مشروعك عمل وتنفيذ الكثير من الاجراءات وبالاخص ان كانت معقدة وام تم التعامل مع جهاز ضعيف او عبر استخدام القاعدة ضمن شبكة محلية قد تصيبك صدمة من استخدام ما قد يكون لو تأثير بالسلب على اداء وسرعة فاعدة البيانات
    لذلك انصحك بالبساطة اعلم انه فد ترى وتشاهد حركات وامور تكون مبهجة وقد تعجب بها جدا ولكن كما اخبرتك 
     
    واليك مثال على الرئيسية  على سبيل المثال
     
    expand and collapse button V3.zip
  17. ابو جودي's post in عرض صور في الشاشة الرئيسية was marked as the answer   
    خير يا استاذ @kanory انت تستخدم الايموجى مشوش ليه
    فى مشكلة فى الكود او التطبيق المرفق 
    عارف طبعا انه لابد من اعادة وضع المسارات الصحيحة لكل صورة فى الجدول طبقا للمسار الموجوده به الصور بعد التحميل للمرفق وفك الضغط
     
  18. ابو جودي's post in طلب بسيط : إظهار رسالة في كود VB was marked as the answer   
    ممكن تجرب الكود ده  
     
    Dim ImagePath As String s1 = Str(Me![رقم الجلوس]) s1 = Right(s1, Len(s1) - 1) ImagePath = "D:\صور\" & s1 & ".jpg" On Error Resume Next Me![Image_Std].Picture = ImagePath If Err.Number <> 0 Then MsgBox "لا توجد صورة مطابقة لرقم الجلوس", vbExclamation, "خطأ" Err.Clear End If On Error GoTo 0 End Sub  
  19. ابو جودي's post in ازاى اتحكم فى هوامش التقرير عن طريق وضع قيم فى فورم الاعدادات was marked as the answer   
    باش مهندسة @hanan_ms 
    والدكتورة @safaa salem5 
    اتفضلو المرفق ده 
    Full Control Of Print Report التحكم في الطابعة وخصائصها طباعة التقارير.mdb
  20. ابو جودي's post in مشكلة في استيراد بيانات من ملف اكسل was marked as the answer   
    اتفضل جرب استيراد البيانات من خلال نموذج Form1
    من خلال الضغط على الزر واستعراض المجلدات لاختيار ملف الاكسل المراد استيراد البيانات منه
    سوف يتم انشاء جدول مؤقت به البيانات انقلها بعد ذلك للجدول وقم بباقى العمليات التى تريد اجراءها كما بحلو لك
    test ExcelDataImport.rar
  21. ابو جودي's post in ما الخطاء في جملة sql was marked as the answer   
    جرب الجملة التالية
     
    "DELETE FROM tblBounce WHERE (((tblBounce.id) = " & x & "));"  
  22. ابو جودي's post in توسيط النماذج على طريقة أبو جودي مع إخفاء إطار أكسس. was marked as the answer   
    للاسف مع الاخفاء لابد من ان تكون  
    Pou Up = yes
    Modal = YES
    لكل النماذج والتقارير
    ولا انصحك باعتماد كود اخفاء اطار الاكسس هذا
  23. ابو جودي's post in كيف اكتب Between 50 and 80 was marked as the answer   
    وممكن 

     
    SELECT VAL([ID]) AS valID, * FROM tblEmployees WHERE VAL([ID]) BETWEEN 50 AND 80;  
    وممكن استخدام دالة CDBL لتحويل إلى رقم مزدوج (Double):
    SELECT CDBL([ID]) AS cdblID, * FROM tblEmployees WHERE CDBL([ID]) BETWEEN 50 AND 80; وممكن استخدام دالة CDATE للتحويل إلى تاريخ (إذا كان يمكن تفسير القيم كتواريخ)
    SELECT CDATE([FieldName]) AS cdateFieldName, * FROM TableName WHERE CDATE([FieldName]) Between #50# And #80#;  
  24. ابو جودي's post in طلب مساعدة في عمل استعلام لاكثر من سجل was marked as the answer   
    طيب ممكن بعد اذن استاذى الجليل ومعلمى القدير و والدى الحبيب الاستاذ @ابوخليل 
    اضيف شئ صغنون من واقع تجربة عملية سابقة لى

    اعتقد الاستعلام بدون اقواس بالشكل الاتى سوف يكون افضل
    لان استخدام الأقواس ([]) في أسماء الحقول قد يؤدي إلى مشكلات في بعض الحالات وهذا عن تجربة شخصية
    ولا يتطوع او يتبرع أحد ويسألنى عن السبب لأننى فعلا لا أعرف 
    SELECT Data1.ID, Data1.namee, Data1.edara, Data1.woork, Data1.egraa FROM Data1 WHERE (Data1.namee Like "*" & [Forms]![Data1]![Combo17] & "*") AND (Data1.egraa Like "*" & [Forms]![Data1]![Combo19] & "*");  
  25. ابو جودي's post in مشكلة حفظ البيانات على جوجل درايف was marked as the answer   
    الحل انك تعمل سطب ل جوجل درايف ع الجهاز وضع قاعدة البيانات فى مجلد جوجل الذى تم تخصيصة للمزامنة
    فى تلك الحالة انت مسكت العصا من المنتصف
    شغال Local  من المجلد عادى
    النت قطع او الكهرباء وقت ما الدنيا تظبط بمجرد ما تتم المزامنة للمجلد تترفع القاعدة
    ما فى حل غير كده 
    يا اما بقه تشترك فى سحابة اللكترونية بتدعم الاكسس وادفع كتيررررررر
×
×
  • اضف...

Important Information