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

ناقل

الخبراء
  • Posts

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

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

  • Days Won

    2

كل منشورات العضو ناقل

  1. ان اردت الضغط والاصلاح قبلها مع رسالة ضع هذا الحدث تحت الزر ...... If MsgBox("هل ترغب في ضغط واصلاح بيانات القاعدة قبل إغلاقها" & vbCrLf & _ "اضغط على (لا) لإلغاء العملية . اضغط على (نعم) لضغط البيانات ", _ vbInformation + vbMsgBoxRight + vbYesNo + vbDefaultButton1, _ "تنبيه : رسالة تأكيد ضغط قاعدة البيانات واصلاحها") = vbYes Then Application.SetOption "Auto compact", True End If Utilities.Restart
  2. وانت في صحة وسلامة طيب انشئ وحدة نمطية وضع هذا فيه ::::::: Private Const TIMEOUT = 99 Public Sub Restart() Dim scriptpath As String scriptpath = Application.CurrentProject.FullName & ".dbrestart.bat" If Dir(scriptpath, vbNormal) <> "" Then If DateAdd("s", TIMEOUT * 1, FileDateTime(scriptpath)) < Date Then Kill scriptpath Else Application.Quit acQuitSaveAll Exit Sub End If End If Dim s As String s = s & "SETLOCAL ENABLEDELAYEDEXPANSION" & vbCrLf s = s & "SET /a counter=0" & vbCrLf s = s & ":CHECKLOCKFILE" & vbCrLf s = s & "ping 0.0.0.255 -n 1 -w 100 > nul" & vbCrLf s = s & "SET /a counter+=1" & vbCrLf s = s & "IF ""!counter!""==""" & TIMEOUT & """ GOTO CLEANUP" & vbCrLf s = s & "IF EXIST ""%~f1.%3"" GOTO CHECKLOCKFILE" & vbCrLf s = s & "start "" "" ""%~f1.%2""" & vbCrLf s = s & ":CLEANUP" & vbCrLf s = s & "del %0" Dim intFile As Integer intFile = FreeFile() Open scriptpath For Output As #intFile Print #intFile, s Close #intFile Dim dbname As String, ext As String, lockext As String Dim idx As Integer For idx = Len(CurrentProject.FullName) To 1 Step -1 If Mid(CurrentProject.FullName, idx, 1) = "." Then Exit For Next idx dbname = Left(CurrentProject.FullName, idx - 1) ext = Mid(CurrentProject.FullName, idx + 1) If Left(ext, 2) = "ac" Then lockext = "laccdb" Else lockext = "ldb" End If s = """" & scriptpath & """ """ & dbname & """ " & ext & " " & lockext Shell s, vbHide Application.Quit acQuitSaveAll End Sub تحت حدث الزر ضع هذا :::::::: Utilities.Restart
  3. تفضل ... DoCmd.RunCommand acCmdPageSetup
  4. طيب استخدم اليوزر والباس سوف يفتح معك طبيعي .... او ادرج البرنامج هنا اذا اردت تعديلاع عليه ... بارك الله فيك
  5. عندي تعرف على نوع الحقول تلقائي في جميع الشروط .....
  6. وهذه لحقلين جميعهم ارقام ...... يبدو ان المشكلة لديك استاذ ز عمر
  7. كلمة المرور على القاعدة ام محرر الاكواد
  8. من محرر التعليمات البرمجية Debug >> Compile احفظ ثم ضغط واصلاح القاعدة ..................... او استخدم هذا ......
  9. ممكن تستخدم التنسيق الشرطي
  10. جرب هذا في حقل التاريخ ..... Between [Forms]![نموذج_بحث]![from] And [Forms]![نموذج_بحث]![to]
  11. هل تقصد كده مثلا ........... If Me.to.Value = "الأحد" Then If Format(Me.from, "hh:mm:ss AMPM") >= Format(DLookup("from", "timing", "[period] = 1"), "hh:mm:ss AMPM") And Format(Me.from, "hh:mm:ss AMPM") < Format(DLookup("to", "timing", "[period] = 1"), "hh:mm:ss AMPM") Then Me.bac1.BackColor = vbYellow ElseIf Format(Me.from, "hh:mm:ss AMPM") >= Format(DLookup("from", "timing", "[period] = 2"), "hh:mm:ss AMPM") And Format(Me.from, "hh:mm:ss AMPM") < Format(DLookup("to", "timing", "[period] = 2"), "hh:mm:ss AMPM") Then Me.bac2.BackColor = vbYellow ElseIf Format(Me.from, "hh:mm:ss AMPM") >= Format(DLookup("from", "timing", "[period] = 3"), "hh:mm:ss AMPM") And Format(Me.from, "hh:mm:ss AMPM") < Format(DLookup("to", "timing", "[period] = 3"), "hh:mm:ss AMPM") Then Me.bac3.BackColor = vbYellow ElseIf Format(Me.from, "hh:mm:ss AMPM") >= Format(DLookup("from", "timing", "[period] = 4"), "hh:mm:ss AMPM") And Format(Me.from, "hh:mm:ss AMPM") < Format(DLookup("to", "timing", "[period] = 4"), "hh:mm:ss AMPM") Then Me.bac4.BackColor = vbYellow ElseIf Format(Me.from, "hh:mm:ss AMPM") >= Format(DLookup("from", "timing", "[period] = 5"), "hh:mm:ss AMPM") And Format(Me.from, "hh:mm:ss AMPM") < Format(DLookup("to", "timing", "[period] = 5"), "hh:mm:ss AMPM") Then Me.bac5.BackColor = vbYellow ElseIf Format(Me.from, "hh:mm:ss AMPM") >= Format(DLookup("from", "timing", "[period] = 6"), "hh:mm:ss AMPM") And Format(Me.from, "hh:mm:ss AMPM") < Format(DLookup("to", "timing", "[period] = 6"), "hh:mm:ss AMPM") Then Me.bac6.BackColor = vbYellow ElseIf Format(Me.from, "hh:mm:ss AMPM") >= Format(DLookup("from", "timing", "[period] = 7"), "hh:mm:ss AMPM") And Format(Me.from, "hh:mm:ss AMPM") < Format(DLookup("to", "timing", "[period] = 7"), "hh:mm:ss AMPM") Then Me.bac7.BackColor = vbYellow ElseIf Format(Me.from, "hh:mm:ss AMPM") >= Format(DLookup("from", "timing", "[period] = 8"), "hh:mm:ss AMPM") And Format(Me.from, "hh:mm:ss AMPM") < Format(DLookup("to", "timing", "[period] = 8"), "hh:mm:ss AMPM") Then Me.bac8.BackColor = vbYellow End If ElseIf Me.to.Value = "الإثنين" Then If Format(Me.from, "hh:mm:ss AMPM") >= Format(DLookup("from", "timing", "[period] = 1"), "hh:mm:ss AMPM") And Format(Me.from, "hh:mm:ss AMPM") < Format(DLookup("to", "timing", "[period] = 1"), "hh:mm:ss AMPM") Then Me.bac9.BackColor = vbYellow ElseIf Format(Me.from, "hh:mm:ss AMPM") >= Format(DLookup("from", "timing", "[period] = 2"), "hh:mm:ss AMPM") And Format(Me.from, "hh:mm:ss AMPM") < Format(DLookup("to", "timing", "[period] = 2"), "hh:mm:ss AMPM") Then Me.bac10.BackColor = vbYellow ElseIf Format(Me.from, "hh:mm:ss AMPM") >= Format(DLookup("from", "timing", "[period] = 3"), "hh:mm:ss AMPM") And Format(Me.from, "hh:mm:ss AMPM") < Format(DLookup("to", "timing", "[period] = 3"), "hh:mm:ss AMPM") Then Me.bac11.BackColor = vbYellow ElseIf Format(Me.from, "hh:mm:ss AMPM") >= Format(DLookup("from", "timing", "[period] = 4"), "hh:mm:ss AMPM") And Format(Me.from, "hh:mm:ss AMPM") < Format(DLookup("to", "timing", "[period] = 4"), "hh:mm:ss AMPM") Then Me.bac12.BackColor = vbYellow ElseIf Format(Me.from, "hh:mm:ss AMPM") >= Format(DLookup("from", "timing", "[period] = 5"), "hh:mm:ss AMPM") And Format(Me.from, "hh:mm:ss AMPM") < Format(DLookup("to", "timing", "[period] = 5"), "hh:mm:ss AMPM") Then Me.bac13.BackColor = vbYellow ElseIf Format(Me.from, "hh:mm:ss AMPM") >= Format(DLookup("from", "timing", "[period] = 6"), "hh:mm:ss AMPM") And Format(Me.from, "hh:mm:ss AMPM") < Format(DLookup("to", "timing", "[period] = 6"), "hh:mm:ss AMPM") Then Me.bac14.BackColor = vbYellow ElseIf Format(Me.from, "hh:mm:ss AMPM") >= Format(DLookup("from", "timing", "[period] = 7"), "hh:mm:ss AMPM") And Format(Me.from, "hh:mm:ss AMPM") < Format(DLookup("to", "timing", "[period] = 7"), "hh:mm:ss AMPM") Then Me.bac15.BackColor = vbYellow ElseIf Format(Me.from, "hh:mm:ss AMPM") >= Format(DLookup("from", "timing", "[period] = 8"), "hh:mm:ss AMPM") And Format(Me.from, "hh:mm:ss AMPM") < Format(DLookup("to", "timing", "[period] = 8"), "hh:mm:ss AMPM") Then Me.bac16.BackColor = vbYellow End If ElseIf Me.to.Value = "الثلاثاء" Then If Format(Me.from, "hh:mm:ss AMPM") >= Format(DLookup("from", "timing", "[period] = 1"), "hh:mm:ss AMPM") And Format(Me.from, "hh:mm:ss AMPM") < Format(DLookup("to", "timing", "[period] = 1"), "hh:mm:ss AMPM") Then Me.bac17.BackColor = vbYellow ElseIf Format(Me.from, "hh:mm:ss AMPM") >= Format(DLookup("from", "timing", "[period] = 2"), "hh:mm:ss AMPM") And Format(Me.from, "hh:mm:ss AMPM") < Format(DLookup("to", "timing", "[period] = 2"), "hh:mm:ss AMPM") Then Me.bac18.BackColor = vbYellow ElseIf Format(Me.from, "hh:mm:ss AMPM") >= Format(DLookup("from", "timing", "[period] = 3"), "hh:mm:ss AMPM") And Format(Me.from, "hh:mm:ss AMPM") < Format(DLookup("to", "timing", "[period] = 3"), "hh:mm:ss AMPM") Then Me.bac19.BackColor = vbYellow ElseIf Format(Me.from, "hh:mm:ss AMPM") >= Format(DLookup("from", "timing", "[period] = 4"), "hh:mm:ss AMPM") And Format(Me.from, "hh:mm:ss AMPM") < Format(DLookup("to", "timing", "[period] = 4"), "hh:mm:ss AMPM") Then Me.bac20.BackColor = vbYellow ElseIf Format(Me.from, "hh:mm:ss AMPM") >= Format(DLookup("from", "timing", "[period] = 5"), "hh:mm:ss AMPM") And Format(Me.from, "hh:mm:ss AMPM") < Format(DLookup("to", "timing", "[period] = 5"), "hh:mm:ss AMPM") Then Me.bac21.BackColor = vbYellow ElseIf Format(Me.from, "hh:mm:ss AMPM") >= Format(DLookup("from", "timing", "[period] = 6"), "hh:mm:ss AMPM") And Format(Me.from, "hh:mm:ss AMPM") < Format(DLookup("to", "timing", "[period] = 6"), "hh:mm:ss AMPM") Then Me.bac22.BackColor = vbYellow ElseIf Format(Me.from, "hh:mm:ss AMPM") >= Format(DLookup("from", "timing", "[period] = 7"), "hh:mm:ss AMPM") And Format(Me.from, "hh:mm:ss AMPM") < Format(DLookup("to", "timing", "[period] = 7"), "hh:mm:ss AMPM") Then Me.bac23.BackColor = vbYellow ElseIf Format(Me.from, "hh:mm:ss AMPM") >= Format(DLookup("from", "timing", "[period] = 8"), "hh:mm:ss AMPM") And Format(Me.from, "hh:mm:ss AMPM") < Format(DLookup("to", "timing", "[period] = 8"), "hh:mm:ss AMPM") Then Me.bac24.BackColor = vbYellow End If ElseIf Me.to.Value = "الأربعاء" Then If Format(Me.from, "hh:mm:ss AMPM") >= Format(DLookup("from", "timing", "[period] = 1"), "hh:mm:ss AMPM") And Format(Me.from, "hh:mm:ss AMPM") < Format(DLookup("to", "timing", "[period] = 1"), "hh:mm:ss AMPM") Then Me.bac25.BackColor = vbYellow ElseIf Format(Me.from, "hh:mm:ss AMPM") >= Format(DLookup("from", "timing", "[period] = 2"), "hh:mm:ss AMPM") And Format(Me.from, "hh:mm:ss AMPM") < Format(DLookup("to", "timing", "[period] = 2"), "hh:mm:ss AMPM") Then Me.bac26.BackColor = vbYellow ElseIf Format(Me.from, "hh:mm:ss AMPM") >= Format(DLookup("from", "timing", "[period] = 3"), "hh:mm:ss AMPM") And Format(Me.from, "hh:mm:ss AMPM") < Format(DLookup("to", "timing", "[period] = 3"), "hh:mm:ss AMPM") Then Me.bac27.BackColor = vbYellow ElseIf Format(Me.from, "hh:mm:ss AMPM") >= Format(DLookup("from", "timing", "[period] = 4"), "hh:mm:ss AMPM") And Format(Me.from, "hh:mm:ss AMPM") < Format(DLookup("to", "timing", "[period] = 4"), "hh:mm:ss AMPM") Then Me.bac28.BackColor = vbYellow ElseIf Format(Me.from, "hh:mm:ss AMPM") >= Format(DLookup("from", "timing", "[period] = 5"), "hh:mm:ss AMPM") And Format(Me.from, "hh:mm:ss AMPM") < Format(DLookup("to", "timing", "[period] = 5"), "hh:mm:ss AMPM") Then Me.bac29.BackColor = vbYellow ElseIf Format(Me.from, "hh:mm:ss AMPM") >= Format(DLookup("from", "timing", "[period] = 6"), "hh:mm:ss AMPM") And Format(Me.from, "hh:mm:ss AMPM") < Format(DLookup("to", "timing", "[period] = 6"), "hh:mm:ss AMPM") Then Me.bac30.BackColor = vbYellow ElseIf Format(Me.from, "hh:mm:ss AMPM") >= Format(DLookup("from", "timing", "[period] = 7"), "hh:mm:ss AMPM") And Format(Me.from, "hh:mm:ss AMPM") < Format(DLookup("to", "timing", "[period] = 7"), "hh:mm:ss AMPM") Then Me.bac31.BackColor = vbYellow ElseIf Format(Me.from, "hh:mm:ss AMPM") >= Format(DLookup("from", "timing", "[period] = 8"), "hh:mm:ss AMPM") And Format(Me.from, "hh:mm:ss AMPM") < Format(DLookup("to", "timing", "[period] = 8"), "hh:mm:ss AMPM") Then Me.bac32.BackColor = vbYellow End If ElseIf Me.to.Value = "الخميس" Then If Format(Me.from, "hh:mm:ss AMPM") >= Format(DLookup("from", "timing", "[period] = 1"), "hh:mm:ss AMPM") And Format(Me.from, "hh:mm:ss AMPM") < Format(DLookup("to", "timing", "[period] = 1"), "hh:mm:ss AMPM") Then Me.bac33.BackColor = vbYellow ElseIf Format(Me.from, "hh:mm:ss AMPM") >= Format(DLookup("from", "timing", "[period] = 2"), "hh:mm:ss AMPM") And Format(Me.from, "hh:mm:ss AMPM") < Format(DLookup("to", "timing", "[period] = 2"), "hh:mm:ss AMPM") Then Me.bac34.BackColor = vbYellow ElseIf Format(Me.from, "hh:mm:ss AMPM") >= Format(DLookup("from", "timing", "[period] = 3"), "hh:mm:ss AMPM") And Format(Me.from, "hh:mm:ss AMPM") < Format(DLookup("to", "timing", "[period] = 3"), "hh:mm:ss AMPM") Then Me.bac35.BackColor = vbYellow ElseIf Format(Me.from, "hh:mm:ss AMPM") >= Format(DLookup("from", "timing", "[period] = 4"), "hh:mm:ss AMPM") And Format(Me.from, "hh:mm:ss AMPM") < Format(DLookup("to", "timing", "[period] = 4"), "hh:mm:ss AMPM") Then Me.bac36.BackColor = vbYellow ElseIf Format(Me.from, "hh:mm:ss AMPM") >= Format(DLookup("from", "timing", "[period] = 5"), "hh:mm:ss AMPM") And Format(Me.from, "hh:mm:ss AMPM") < Format(DLookup("to", "timing", "[period] = 5"), "hh:mm:ss AMPM") Then Me.bac37.BackColor = vbYellow ElseIf Format(Me.from, "hh:mm:ss AMPM") >= Format(DLookup("from", "timing", "[period] = 6"), "hh:mm:ss AMPM") And Format(Me.from, "hh:mm:ss AMPM") < Format(DLookup("to", "timing", "[period] = 6"), "hh:mm:ss AMPM") Then Me.bac38.BackColor = vbYellow ElseIf Format(Me.from, "hh:mm:ss AMPM") >= Format(DLookup("from", "timing", "[period] = 7"), "hh:mm:ss AMPM") And Format(Me.from, "hh:mm:ss AMPM") < Format(DLookup("to", "timing", "[period] = 7"), "hh:mm:ss AMPM") Then Me.bac39.BackColor = vbYellow ElseIf Format(Me.from, "hh:mm:ss AMPM") >= Format(DLookup("from", "timing", "[period] = 8"), "hh:mm:ss AMPM") And Format(Me.from, "hh:mm:ss AMPM") < Format(DLookup("to", "timing", "[period] = 8"), "hh:mm:ss AMPM") Then Me.bac40.BackColor = vbYellow End If End If
  12. احسنت وتشكر على الشرح ... ولو ارفقت مثال للشرح لكان اجمل للمبتدئين امثالي ... بارك الله فيك
  13. الف . الف . مبروك تستاهل ..... معان ..
  14. استخدم حلقات التكرار مثل . For وغيرها او ارفق مثال للتطبيق عليه
  15. هذه واحدة منها ..... وهناك في المنتدى العديد من الطرق ... test (8).accdb
  16. في برنامجك اسماء الحقول في الاكسل ليست بنفس اسماء حقول جدول الاكسس .... اما تغير اسماء الحقول بنفس الاسم أو تستخدم طريقة اخرى لاستيراد البيانات ... وفقط
  17. ده اختبار ولى ايه .... طيب هناك طرق طبعا منها ... وضع هذا في تنسيق الكمبوبكس .... @;"رقم الموظف"
  18. اعتقد لو فتحت موضوع جديد وادرجت مرفق او مثال للمطلوب لكان افضل ... بارك الله فيك ..
  19. هل الاعمال اليومية مقاسة ... اقصد لها درجات مثلا ...أو بدون ..... اذا كانت درجات فهي بسيطة .... اجعل الاستعلام يظهر اعلا رصيد واخبر الاستعلام .. ان المطلوب سجل واحد صاحب اعلا درجات .... اما اذا كانت بدون درجات ..... اطلب من الاستعلام صاحب اكثر عدد اعمال يومية .... والله اعلم .... لو تكون بالدرجات حسب صعوبة المهمة اليومية ... افضل
×
×
  • اضف...

Important Information