بحث مخصص من جوجل فى أوفيسنا
![]()
Custom Search
|
نجوم المشاركات
Popular Content
Showing content with the highest reputation on 03/01/23 in all areas
-
One line ShName = Data.Range("C6").Text If ShName = "" Or IsEmpty(ShName) Then MsgBox "Cell Is Empty", vbExclamation: Exit Sub2 points
-
ماشاء الله كنت بدأت في العمل ثم شاهدت مشاركة استاذي تم اضافة فكرة عد السجل لمنع تكرار الحاق سجل سبق الحاقه ليكون الامر Dim x As Integer x = DCount("*", "table2", "[itemcode]=" & Me.itemCode) If x > 0 Then GoTo a Else GoTo b End If b: Me.Refresh Dim rs As Recordset Dim strsql As String strsql = "SELECT Table1.* FROM Table1 WHERE Table1.[itemCode]=" & [Forms]![AdditemPerCode]![itemCode] Set rs = CurrentDb.OpenRecordset(strsql) Me.itemname = rs!itemname Me.itemdesc = rs!itemdesc Me.itemqty = rs!itemqty Me.dateee = rs!dateee rs.Close GoTo c a: MsgBox "الصنف سبق الحاقة" Me.Undo GoTo c c: Exit Sub الملف مرفق Database3.accdb2 points
-
تفضل Private Sub itemCode_AfterUpdate() Me.Refresh Dim rs As Recordset Dim strsql As String strsql = "SELECT Table1.* FROM Table1 WHERE Table1.[itemCode]=" & [Forms]![AdditemPerCode]![itemCode] Set rs = CurrentDb.OpenRecordset(strsql) Me.itemname = rs!itemname Me.itemdesc = rs!itemdesc Me.itemqty = rs!itemqty Me.dateee = rs!dateee End Sub Database3.accdb2 points
-
2 points
-
الحقيقة انا رجل كبير وفهمي على قدي فكانت الاجابة على قدر فهمي للامر وهذا يدل على رغبتك في التعلم وحسن تصرفك 🌹2 points
-
جرب Select Case Modifiable2 Case Is = 1 Me.Modifiable2.ForeColor = vbRed Case Is = 2 Me.Modifiable2.ForeColor = vbBlue Case Is = 3 Me.Modifiable2.ForeColor = vbGreen End Select الملف في المرفقات 1111.accdb2 points
-
الشكر كل الشكر للاستاذ lionheart والاستاذ AbuuAhmed على مهجودكم والله يجعله في ميزان حسناتكم2 points
-
العين لا تعلى على الحاجب وبعد اذن مهندسنا احببت المشاركه طريقة نسح النموذج بنفس الشكل والمسميات بالكود يوفر لك الجهد تكرار النماذج.accdb2 points
-
برنامج يصلح لادارة عيادات الاسنان والعلاج الطبعى بسيط وسهل الاستخدام بدون باسورد طبيب الاسنان او العلاج الطبيعى.xlsm1 point
-
الاطروحات السابقة تناولت فيها العديد من الافكار حول الاستفادة من الفورم التفاعلي وعناصر التحكم وصفات كل عنصر علي حدة احيانا المستخدم يكون محتاج شاشة كبيرة فيها العديد والعديد من عناصر التحكم مما يشكل حالة من عدم التركيز للشكل العام وكمية العناصر المعروضة في الوقت نفسه فكرة بسيطة تخلي الفورم نفسه يعرض لك يلي انت محتاجه وذلك عن طريق التحكم في خصائص عنصر التحكم نفسه الفكرة باختصار كانك شغال علي دوت نت او علي اي موقع تضغط علي تبويب معين يظهر لك عناصر التحكم الخاصة به وتتحكم فيه كما تشاء اسيبكم للتجربة وان شاء الله تكون فيها النفع ولا تنسونا بدعوة بظهر الغيب بصلاح الحال المثال المرفق علي بيانات الموظفين لا يحتوي الا علي اكواد الحركة الخاصة بالموضوع Create Drill Down Data Entry.xlsm1 point
-
السلام عليكم كثير من الاسئلة اراها على المواقع لاعادة ربط الجداوا واخذ نسخة احتياطية من خلال الاكسيس لقاعدة البيانات الخلفية اس كي ال سيرفر فاحببت ان تكون في موضوع مستقل ليسهل الرجوع اليها ملاحظة :اي عبارة تستطيع تنفيذها في اس كيو ال سرفر تستطيع تنفيذها في اكسيس من خلال الباس ثرو1 point
-
أستاذي @ابوبسمله شكرا لك على هذا المجهود والشرح التفصيلي والمتعوب علية حقاً حفظك الله وزاد الله في نور علمك الذي يعمنا خيرة بالرغم اني جرت الملف اكثر من مرة وحاولت التعديل حتى يعمل .. لكن دون فائدة لكن سعادتي والله كبيرة عندما دخلت المنتدى ووجدت ردك التفصيلي ماذا عساي ان اقول لك ألا : جزاك الله خيرا .. واسأل الله ان يدخلك جنته الفردوس الاعلى1 point
-
رفع الله قدرك في الدنيا والاخرة اخي واستاذي الفاضل1 point
-
الله يحفظك استاذنا الكريم فكرة منع التكرار جميلة .. والذي جاء على بالي بعد تصفح المرفق ان جدول1 اصناف وجدول2 تفاصيل و كما تعلم التكرار مطلوب ولكني حقيقة وقفت حائرا امام جلب التاريخ .. وضع عندي علامة استفهام ؟ بل اجابتك الاخيرة هي افضل اجابة1 point
-
ممكن ولكن هو تقرير واحد يظهر لك نتيجة التصفية اما مسدد او غير مسدد ويمكن تطبيق فكرتك في عمودين ضمن تقرير واحد ولكن بشرطين : 1- الفترة بين تاريخين تظهر في رأس التقرير 2- المجموع يكون رقم واحد سواء كان مسدد او غير مسدد وهذه غير عملية انك تطبع ورقة كاملة لا تحتوي الا على سطرين1 point
-
1 point
-
What's the error message Try using one condition only If ShName = "" Then MsgBox "Cell Is Empty", vbExclamation: Exit Sub1 point
-
1 point
-
مثل ما عملت بالنموذج اعمله في الاستعلام ادرج تقرير فرعي يكون مصدره الاستعلام الثاني ربما اجد لك حلا افضل دعني اجرب على مثالك1 point
-
انظر هذا الموضع سوف يفيدك ان شا الله1 point
-
شكرا جزيلا فهمتنى شيئ آخر ايضا بشكرك جدا على جهدك الكريم1 point
-
وعليكم السلام.. حولت المعرف الى رقم للسهولة...ويجب ان يكون مفهرس حتى لايتكرر Update a record.rar1 point
-
1 point
-
يا سلام عليك يا استاذي العزيز جواب و لا في الاحلام : طلبت تغيير خلفية القائمة المنسدلة و ليس النص الموجود بالقائمة المنسدلة لكن افادني الجواب و غيرت Forecolor بــــ Backcolor و مشي الحال المهم تستحق احسن اجابة في هذا الصباح المبارك و هذا كودك بعد تعديله : شكرا كثيرا Private Sub Modifiable2_AfterUpdate() Select Case Modifiable2 Case Is = 1 Me.Modifiable2.BackColor = vbRed Case Is = 2 Me.Modifiable2.BackColor = vbBlue Case Is = 3 Me.Modifiable2.BackColor = vbGreen End Select End Sub1 point
-
1 point
-
مشاركة مع استاذنا الكبير اذا كان النموذج الفرعي من نوع نماذج مستمر استخدم التنسيق الشرطي1 point
-
1 point
-
لم أدرك القصد لكن حاولت Exomple-Search.accdb1 point
-
السلام عليكم ورحمه الله وبركاته مشاركه مع اخى واستاذى ومهندسنا العزيز قاسم @Eng.Qassim جزاه الله عنا كل خير اخى الفاضل @qathi ركز معى فالخطوات لكى تتعلم قم بانشاء استعلام مبنى على الجدول InvoiceTT وادرج الحقول التى تريدها وضرورى يكون به الحقل رقم الفاتوره InvoiceNum ثم فى المعيار ضع المعيار التالى وهو رقم الفاتوره بنموذج المرتجعات [Forms]![InvoiceReF]![Num] ثم قم بانشاء استعلام الحاق مبنى على هذا الاستعلام وقم بادراج الحقول ثم فى حقل رقم الفاتوره InvoiceNum ضع رقم فاتوره المرتجعات Expr1: [Forms]![InvoiceReF]![InvoiceNum] ثم فى حقل Movement ضع Expr2: [Forms]![InvoiceReF]![Movement] ثم فى زر الحفظ ضع كود تشغيل الاستعلام Private Sub Save_Click() On Error Resume Next DoCmd.RunCommand acCmdSaveRecord DoCmd.SetWarnings 0 DoCmd.OpenQuery "qryInsert" 'DoCmd.OpenQuery "qryInsert_1" DoCmd.SetWarnings -1 Me.Refresh End Sub ثم افتح النموذج وادخل رقم الفاتوره المراد عمل مرتجع لها واضغط زر الحفظ ويمكنك الاختصار بعمل استعلام الحاق فقط كالتالى واليك المرفق بعد التعديل بالتوفيق اخى InvoiceSale_10-1_1.accdb1 point
-
استاذى ومعلمى ومثقفى الاستاذ/ خالد الله يرضى عنك ـ هذا طلبى فعلا ـ رحم الله والديك ـ وشفى الله والدك واعفى عنه واتم عليه الصحة والعافية يارب اشكرك شكر يعجز اللسان عنه ـ فعلا استاذ وعبقرى بعدة حلول واختيار ياحلبى جزاك الله كل خير ـ وجعله فى ميزان حسناتك1 point
-
1 point
-
1 point
-
وعليكم السلام.. لدي ربما ملاحظتين..الاولى ان جدول العملاء لايربط مع ذيل الفاتورة وانما براس الفاتورة ثانيا فاتورة المرتجع مربوطة بجدول المبيعات فكيف تريد بدون كميات ..وكيف ستعرف الكميات المباعة من الكمية المرتجعة عملت لك مربعي تحرير باسم العميل ورقم الفاتورة InvoiceSale_10-1.rar1 point
-
الطريقة الاولى بمصدر السجلات If IsNull(Me.Text0) Then GoTo k Else GoTo a End If a: Dim rs As DAO.Recordset Set rs = CurrentDb.OpenRecordset("SELECT items.* FROM items;") rs.FindFirst "[barcod] =" & Me.Text0 If Not rs.NoMatch Then MsgBox "الرقم مسجل" Else MsgBox "رقم غير مسجل" End If rs.Close Set rs = Nothing Exit Sub k: MsgBox "اكتب رقم الباركود" الثانية عد السجلات بواسطة دالة DCount Dim x As Integer x = DCount("[barcod]", "items", "[barcod]=" & Me.Text0) If x > 0 Then MsgBox "الرقم مسجل" Else MsgBox "رقم غير مسجل" End If مرفق الملف رسالة بعدم وجوده فى جدول اخر(1).accdb1 point
-
أخي الكريم السلام عليكم سجل دخول دون كتابة أي شيء في حقول اسم المستخدم أو كلمة السر والله أعلم1 point
-
تفضل هذه الوحدة النمطية الخاصة كما في الصورة اعلاه افتح الاستعلام وانظر النتيجة : الرقم الموجب زيادة والرقم السالب نقص والصفر هو الوزن المثالي يمكنك بناء نموذجك على الاستعلام ولا حظ ان اي تغيير على الارقام سيتغير التقييم آليا يمكن ايضا ادخال الجنس ذكر / انثى ضمن الوحدة النمطية ان رغبت في ذلك سوف اضع لك الاساس وانت تدخل الاوزان Public Function GetPerfectWeight(xheight As Integer, xold As Integer) As Double If xheight = 150 Then If xold <= 24 Then GetPerfectWeight = 57 If xold >= 25 And xold <= 29 Then GetPerfectWeight = 60 If xold >= 30 And xold <= 39 Then GetPerfectWeight = 61 If xold >= 40 And xold <= 49 Then GetPerfectWeight = 64 If xold >= 50 Then GetPerfectWeight = 67 End If If xheight = 152 Then If xold <= 24 Then GetPerfectWeight = 59 If xold >= 25 And xold <= 29 Then GetPerfectWeight = 62 If xold >= 30 And xold <= 39 Then GetPerfectWeight = 63 If xold >= 40 And xold <= 49 Then GetPerfectWeight = 65 If xold >= 50 Then GetPerfectWeight = 68 End If If xheight = 154 Then If xold <= 24 Then GetPerfectWeight = 60 If xold >= 25 And xold <= 29 Then GetPerfectWeight = 63 If xold >= 30 And xold <= 39 Then GetPerfectWeight = 64 If xold >= 40 And xold <= 49 Then GetPerfectWeight = 67 If xold >= 50 Then GetPerfectWeight = 70 End If If xheight = 156 Then If xold <= 24 Then GetPerfectWeight = 63 If xold >= 25 And xold <= 29 Then GetPerfectWeight = 64 If xold >= 30 And xold <= 39 Then GetPerfectWeight = 66 If xold >= 40 And xold <= 49 Then GetPerfectWeight = 68 If xold >= 50 Then GetPerfectWeight = 72 End If If xheight = 158 Then If xold <= 24 Then GetPerfectWeight = 63 If xold >= 25 And xold <= 29 Then GetPerfectWeight = 66 If xold >= 30 And xold <= 39 Then GetPerfectWeight = 67 If xold >= 40 And xold <= 49 Then GetPerfectWeight = 71 If xold >= 50 Then GetPerfectWeight = 73 End If If xheight = 160 Then If xold <= 24 Then GetPerfectWeight = 65 If xold >= 25 And xold <= 29 Then GetPerfectWeight = 67 If xold >= 30 And xold <= 39 Then GetPerfectWeight = 69 If xold >= 40 And xold <= 49 Then GetPerfectWeight = 72 If xold >= 50 Then GetPerfectWeight = 75 End If If xheight = 162 Then If xold <= 24 Then GetPerfectWeight = 66 If xold >= 25 And xold <= 29 Then GetPerfectWeight = 68 If xold >= 30 And xold <= 39 Then GetPerfectWeight = 70 If xold >= 40 And xold <= 49 Then GetPerfectWeight = 74 If xold >= 50 Then GetPerfectWeight = 76 End If If xheight = 164 Then If xold <= 24 Then GetPerfectWeight = 67 If xold >= 25 And xold <= 29 Then GetPerfectWeight = 69 If xold >= 30 And xold <= 39 Then GetPerfectWeight = 72 If xold >= 40 And xold <= 49 Then GetPerfectWeight = 75 If xold >= 50 Then GetPerfectWeight = 77 End If If xheight = 166 Then If xold <= 24 Then GetPerfectWeight = 68 If xold >= 25 And xold <= 29 Then GetPerfectWeight = 71 If xold >= 30 And xold <= 39 Then GetPerfectWeight = 74 If xold >= 40 And xold <= 49 Then GetPerfectWeight = 76 If xold >= 50 Then GetPerfectWeight = 79 End If If xheight = 168 Then If xold <= 24 Then GetPerfectWeight = 69 If xold >= 25 And xold <= 29 Then GetPerfectWeight = 73 If xold >= 30 And xold <= 39 Then GetPerfectWeight = 75 If xold >= 40 And xold <= 49 Then GetPerfectWeight = 78 If xold >= 50 Then GetPerfectWeight = 80 End If If xheight = 170 Then If xold <= 24 Then GetPerfectWeight = 70 If xold >= 25 And xold <= 29 Then GetPerfectWeight = 74 If xold >= 30 And xold <= 39 Then GetPerfectWeight = 77 If xold >= 40 And xold <= 49 Then GetPerfectWeight = 80 If xold >= 50 Then GetPerfectWeight = 83 End If If xheight = 172 Then If xold <= 24 Then GetPerfectWeight = 72 If xold >= 25 And xold <= 29 Then GetPerfectWeight = 76 If xold >= 30 And xold <= 39 Then GetPerfectWeight = 78 If xold >= 40 And xold <= 49 Then GetPerfectWeight = 81 If xold >= 50 Then GetPerfectWeight = 85 End If If xheight = 174 Then If xold <= 24 Then GetPerfectWeight = 74 If xold >= 25 And xold <= 29 Then GetPerfectWeight = 77 If xold >= 30 And xold <= 39 Then GetPerfectWeight = 80 If xold >= 40 And xold <= 49 Then GetPerfectWeight = 83 If xold >= 50 Then GetPerfectWeight = 86 End If If xheight = 176 Then If xold <= 24 Then GetPerfectWeight = 76 If xold >= 25 And xold <= 29 Then GetPerfectWeight = 78 If xold >= 30 And xold <= 39 Then GetPerfectWeight = 82 If xold >= 40 And xold <= 49 Then GetPerfectWeight = 85 If xold >= 50 Then GetPerfectWeight = 88 End If If xheight = 178 Then If xold <= 24 Then GetPerfectWeight = 77 If xold >= 25 And xold <= 29 Then GetPerfectWeight = 80 If xold >= 30 And xold <= 39 Then GetPerfectWeight = 83 If xold >= 40 And xold <= 49 Then GetPerfectWeight = 87 If xold >= 50 Then GetPerfectWeight = 90 End If If xheight = 180 Then If xold <= 24 Then GetPerfectWeight = 79 If xold >= 25 And xold <= 29 Then GetPerfectWeight = 82 If xold >= 30 And xold <= 39 Then GetPerfectWeight = 85 If xold >= 40 And xold <= 49 Then GetPerfectWeight = 89 If xold >= 50 Then GetPerfectWeight = 92 End If If xheight = 182 Then If xold <= 24 Then GetPerfectWeight = 81 If xold >= 25 And xold <= 29 Then GetPerfectWeight = 84 If xold >= 30 And xold <= 39 Then GetPerfectWeight = 87 If xold >= 40 And xold <= 49 Then GetPerfectWeight = 90 If xold >= 50 Then GetPerfectWeight = 94 End If If xheight = 184 Then If xold <= 24 Then GetPerfectWeight = 82 If xold >= 25 And xold <= 29 Then GetPerfectWeight = 86 If xold >= 30 And xold <= 39 Then GetPerfectWeight = 89 If xold >= 40 And xold <= 49 Then GetPerfectWeight = 92 If xold >= 50 Then GetPerfectWeight = 96 End If If xheight = 186 Then If xold <= 24 Then GetPerfectWeight = 84 If xold >= 25 And xold <= 29 Then GetPerfectWeight = 87 If xold >= 30 And xold <= 39 Then GetPerfectWeight = 90 If xold >= 40 And xold <= 49 Then GetPerfectWeight = 94 If xold >= 50 Then GetPerfectWeight = 98 End If If xheight = 188 Then If xold <= 24 Then GetPerfectWeight = 85 If xold >= 25 And xold <= 29 Then GetPerfectWeight = 89 If xold >= 30 And xold <= 39 Then GetPerfectWeight = 92 If xold >= 40 And xold <= 49 Then GetPerfectWeight = 96 If xold >= 50 Then GetPerfectWeight = 100 End If If xheight = 190 Then If xold <= 24 Then GetPerfectWeight = 86 If xold >= 25 And xold <= 29 Then GetPerfectWeight = 90 If xold >= 30 And xold <= 39 Then GetPerfectWeight = 95 If xold >= 40 And xold <= 49 Then GetPerfectWeight = 98 If xold >= 50 Then GetPerfectWeight = 102 End If If xheight = 192 Then If xold <= 24 Then GetPerfectWeight = 87 If xold >= 25 And xold <= 29 Then GetPerfectWeight = 91 If xold >= 30 And xold <= 39 Then GetPerfectWeight = 96 If xold >= 40 And xold <= 49 Then GetPerfectWeight = 100 If xold >= 50 Then GetPerfectWeight = 104 End If If xheight = 194 Then If xold <= 24 Then GetPerfectWeight = 88 If xold >= 25 And xold <= 29 Then GetPerfectWeight = 92 If xold >= 30 And xold <= 39 Then GetPerfectWeight = 98 If xold >= 40 And xold <= 49 Then GetPerfectWeight = 102 If xold >= 50 Then GetPerfectWeight = 106 End If If xheight = 196 Then If xold <= 24 Then GetPerfectWeight = 89 If xold >= 25 And xold <= 29 Then GetPerfectWeight = 93 If xold >= 30 And xold <= 39 Then GetPerfectWeight = 100 If xold >= 40 And xold <= 49 Then GetPerfectWeight = 104 If xold >= 50 Then GetPerfectWeight = 108 End If If xheight = 198 Then If xold <= 24 Then GetPerfectWeight = 90 If xold >= 25 And xold <= 29 Then GetPerfectWeight = 94 If xold >= 30 And xold <= 39 Then GetPerfectWeight = 101 If xold >= 40 And xold <= 49 Then GetPerfectWeight = 106 If xold >= 50 Then GetPerfectWeight = 110 End If If xheight = 200 Then If xold <= 24 Then GetPerfectWeight = 91 If xold >= 25 And xold <= 29 Then GetPerfectWeight = 95 If xold >= 30 And xold <= 39 Then GetPerfectWeight = 103 If xold >= 40 And xold <= 49 Then GetPerfectWeight = 108 If xold >= 50 Then GetPerfectWeight = 112 End If End Function الوزن المثالي2.rar1 point
-
يمكن اختصار .Add a(i, 1), Array(Array(a(i, 1), a(i, 2), a(i, 3), a(i, 4), a(i, 5), a(i, 6), _ a(i, 7), a(i, 8), a(i, 9), a(i, 10), a(i, 11), a(i, 12), a(i, 13), a(i, 14), a(i, 15), _ a(i, 16), a(i, 17), a(i, 18), a(i, 19), a(i, 20), a(i, 21), a(i, 22), a(i, 23), _ a(i, 24), a(i, 25), a(i, 26), a(i, 27)), Array(a(i, 28), a(i, 29))) إلى .Add a(i, 1), Array(Application.Transpose(Application.Index(a, i, Evaluate("row(1:" & UBound(a, 2) - 2 & ")"))), _ Array(a(i, UBound(a, 2) - 1), a(i, UBound(a, 2)))) Sub test() Dim a, aa, w Dim i& a = Sheets(1).Cells.CurrentRegion With CreateObject("scripting.dictionary") For i = 2 To UBound(a) If Not .exists(a(i, 1)) Then .Add a(i, 1), Array(Application.Transpose(Application.Index(a, i, Evaluate("row(1:" & UBound(a, 2) - 2 & ")"))), _ Array(a(i, UBound(a, 2) - 1), a(i, UBound(a, 2)))) Else w = .Item(a(i, 1)) w(1)(0) = w(1)(0) & "|" & a(i, UBound(a, 2) - 1) w(1)(1) = w(1)(1) & "|" & a(i, UBound(a, 2)) .Item(a(i, 1)) = w End If Next For i = 0 To .Count - 1 Sheets(2).Cells(i + 2, 1).Resize(, 4) = .items()(i)(0) Sheets(2).Cells(i + 2, 1).Offset(, 4) = .items()(i)(1)(1) Next Application.DisplayAlerts = False Sheets(2).Cells(2, 5).Resize(.Count).TextToColumns Destination:=Sheets(2).Cells(2, 5), DataType:=xlDelimited, _ Other:=True, OtherChar:="|", FieldInfo:=Array(14, 1), TrailingMinusNumbers:=True Application.DisplayAlerts = True End With End Sub1 point
-
1 point
-
عزيزي كما لا يخفى عليكم أن أساس قيمة حقل التاريخ والوقت ما هو إلا رقمي وما نراه نحن إلا تنسيقا نصيا لقيمته الرقمية ، وأنا الحقيقة لا أحول رقمي إلى رقمي بل أهرب من تاثير التنسيق النصي على قيمة التاريخ الرقمية كاحتراز حتى لا أقع كما غيري في مشكلات عدم نجاح المقارنات. بالطبع لا بد أن يكون نوع الحقل/الصندوق "تاريخ" وإلا سنضطر إلى استخدام دالة وسيطة وهي CDate قبل استخدام دالة CLng.1 point
-
استخدام دالة CLng لتحويل التاريخ إلى رقم تسلسلي فيه احتراز أكبر: CLng(bToDate) = CLng(bFromDate)1 point
-
استاذي العزيز @ابوبسمله جزاك الله عني خير تم حل هذة النقطة من خلال مساعداتكم السابقة في المنتدى مش عارف اشكرك ازاي على المساعدة والرد السريع ولكن استحملني لغاية ما اخلص السيستم اللى بعملة في حالة اي مشاكل تواجهني تاني وشكرا1 point
-
كم انتم رائعون ومتميزون @ابوخليل @ابوبسمله @kkhalifa1960 شكراً جزيلاً لكم ولجميع اعضاء المنتدى والقائمين عليه .. اسئل الله ان ينفعنا بعلمكم وان يجعل ذلك في ميزان حسناتكم ..1 point
-
شكرا استاذ موسى على المرفق الجميل جزاك الله خيرا قمت باستلال الزبدة منه .. لكونها هنا ابقى واقرب للتناول On Error GoTo errHandler Dim rs1 As DAO.Recordset 'Table with attachments to be imported Dim rs2 As DAO.Recordset 'Table to import attachments into Dim rs3 As DAO.Recordset2 'Attachments to be imported Dim rs4 As DAO.Recordset2 'Recordset to accept the new attachments Dim strSQL As String 'Open table with attachments strSQL = "SELECT RecordID, Attachments FROM tblOldTable WHERE Attachments.FileName Is Not Null ORDER BY RecordID" Set rs1 = db.OpenRecordset(strSQL, dbOpenSnapshot) 'Loop through all the records to be imported Do While Not rs1.EOF 'Open table to be appended strSQL = "SELECT RecordID, Attachments FROM tblNewTable WHERE RecordID=" & rs1!recordid Set rs2 = db.OpenRecordset(strSQL, dbOpenDynaset) 'Recordsets for the attachment fields Set rs3 = rs1!Attachments.Value Set rs4 = rs2!Attachments.Value 'Table to be appended must be in edit mode rs2.Edit 'Add all new attachments (Note: Access automatically adds the file type) Do While Not rs3.EOF rs4.AddNew rs4!FileData = rs3!FileData rs4!FileName = rs3!FileName rs4.Update rs3.MoveNext Loop 'Update parent record rs2.Update 'Go to next record with attachment to import rs1.MoveNext Loop 'Refresh new table subform Me.frmNewAttachment.Requery errExit: 'Cleanup rs2.Close rs1.Close Set rs4 = Nothing Set rs3 = Nothing Set rs2 = Nothing Set rs1 = Nothing Exit Sub errHandler: MsgBox Err.Number & ": " & Err.Description Resume errExit1 point
-
السلام عليكم ورحمة الله وبركاته مساكم الله بالخير اخواني الاعزاء ... عندي برنامج قاعدة بيانات وفيه حقول معينة يجب تعبئتها وهي خالية من اي قيمة وفيه حقل واحد فيه قيمه معينة , المشكلة عندما وضعت كود تعبئة اجبارية يستثني هذا الحقل بحجة ان فيه قيمة ... الذي اريده هل يوجد كود اجباري خاص بتعبئة الحقول التي بها قيمة وذلك ياتي عندما تريد تعبئة سجل جديد .0 points