hosslom قام بنشر سبتمبر 21, 2021 مشاركة قام بنشر سبتمبر 21, 2021 السلام عليكم اخوتي مرفق قاعده تحتوي علي جدول يحتوي كود المريض ونوع الانبوبه والاختبار عند عمل استعلام يحدث تكرار لاسم الاختبار ولا ينظر لمعيار الكود للمريض هل من حل في الكود ؟ وشكرا جزيلا test.rar رابط هذا التعليق شارك More sharing options...
Barna قام بنشر سبتمبر 21, 2021 مشاركة قام بنشر سبتمبر 21, 2021 استبدل الفانك لديك بهذا ..... Public Function Concatenate_test_items(C As String) As String Dim rst As DAO.Recordset Dim myWhere As String 'do the Where Criteria in an easy way, item by item myWhere = myWhere & "[tube]='" & C & "' AND [code]='" & 1000 & "'" 'set the Data source Set rst = CurrentDb.OpenRecordset("Select [test] From [Table1] Where " & myWhere) 'Loop through the Records Do Until rst.EOF 'Concatenate the items Concatenate_test_items = Concatenate_test_items & ", " & rst!test 'move to the next Record rst.MoveNext Loop 'Remove the initial ", ", thats why we start from the 3rd letter Concatenate_test_items = Mid(Concatenate_test_items, 3) 'clean up memory rst.Close: Set rst = Nothing End Function 1 رابط هذا التعليق شارك More sharing options...
hosslom قام بنشر سبتمبر 21, 2021 الكاتب مشاركة قام بنشر سبتمبر 21, 2021 15 دقائق مضت, Barna said: Public Function Concatenate_test_items(C As String) As String Dim rst As DAO.Recordset Dim myWhere As String 'do the Where Criteria in an easy way, item by item myWhere = myWhere & "[tube]='" & C & "' AND [code]='" & 1000 & "'" 'set the Data source Set rst = CurrentDb.OpenRecordset("Select [test] From [Table1] Where " & myWhere) 'Loop through the Records Do Until rst.EOF 'Concatenate the items Concatenate_test_items = Concatenate_test_items & ", " & rst!test 'move to the next Record rst.MoveNext Loop 'Remove the initial ", ", thats why we start from the 3rd letter Concatenate_test_items = Mid(Concatenate_test_items, 3) 'clean up memory rst.Close: Set rst = Nothing End Function شكرا لمرورك الكريم للاسف الكود لايعطي المطلوب ؟؟ هل يمكن ارفاق المثال بالكود لو تكرمت رابط هذا التعليق شارك More sharing options...
Barna قام بنشر سبتمبر 21, 2021 مشاركة قام بنشر سبتمبر 21, 2021 2 دقائق مضت, hosslom said: شكرا لمرورك الكريم للاسف الكود لايعطي المطلوب ؟؟ هل يمكن ارفاق المثال بالكود لو تكرمت ماهو المطلوب اليس هذا هو المطلوب ....... رابط هذا التعليق شارك More sharing options...
hosslom قام بنشر سبتمبر 21, 2021 الكاتب مشاركة قام بنشر سبتمبر 21, 2021 1 دقيقه مضت, Barna said: شكرا لمرورك الكريم للاسف الكود لايعطي المطلوب ؟؟ هل يمكن ارفاق المثال بالكود لو تكرمت نعم هذا هو المطلوب ولكن لايعطيني النتيجة المطلوبه لا ادري لماذا رابط هذا التعليق شارك More sharing options...
Barna قام بنشر سبتمبر 21, 2021 مشاركة قام بنشر سبتمبر 21, 2021 اليس هذا هو نتيجة برنامجك قبل التعديل ؟؟؟؟؟؟؟ تفضل ....... test (1).rar 1 رابط هذا التعليق شارك More sharing options...
hosslom قام بنشر سبتمبر 21, 2021 الكاتب مشاركة قام بنشر سبتمبر 21, 2021 12 دقائق مضت, Barna said: اليس هذا هو نتيجة برنامجك قبل التعديل ؟؟؟؟؟؟؟ نعم هذا هو المطلوب ظبطت معي جزاك الله كل خير وجعله الله في ميزان حسناتك أخي الكريم شكرا جزيلا رابط هذا التعليق شارك More sharing options...
hosslom قام بنشر سبتمبر 22, 2021 الكاتب مشاركة قام بنشر سبتمبر 22, 2021 12 ساعات مضت, hosslom said: اليس هذا هو نتيجة برنامجك قبل التعديل ؟؟؟؟؟؟؟ اخي الكريم اسف علي الازعاج ولكن عند تضمين المثال في القاعده عندي لتطبيقها يعطيني خطأ عند معاينه التقرير 😪😪 أرفقت القاعده جزاك الله كل خير test2.accdb رابط هذا التعليق شارك More sharing options...
الردود الموصى بها
من فضلك سجل دخول لتتمكن من التعليق
ستتمكن من اضافه تعليقات بعد التسجيل
سجل دخولك الان