ibnjabalsoftware قام بنشر فبراير 7, 2023 قام بنشر فبراير 7, 2023 INSERT INTO Obtained_Basic ( File_No_B, Academic_Year_B, Class_B, Classroom_B, Periods_B ) SELECT stages.File_No_S, [Forms]![Operations_On_Result]![Year] AS [Year], stages.Class_S, stages.Classroom_S, [Forms]![Operations_On_Result]![Periods] AS Periods FROM stages WHERE ((([Forms]![Operations_On_Result]![Year])=[Forms]![Operations_On_Result]![Year]) AND (([Forms]![Operations_On_Result]![Periods])=[Forms]![Operations_On_Result]![Periods]) AND (([File_No_S] & [Forms]![Operations_On_Result]![Year] & [Class_S] & [Classroom_S] & [Forms]![Operations_On_Result]![Periods]) Not In (SELECT [File_No_B] & [Academic_Year_B] & [Class_B] & [Classroom_B] & [Periods_B] AS Not2 FROM Obtained_Basic)));
kanory قام بنشر فبراير 7, 2023 قام بنشر فبراير 7, 2023 INSERT INTO Obtained_Basic ( File_No_B, Academic_Year_B, Class_B, Classroom_B, Periods_B ) SELECT stages.File_No_S, [Forms]![Operations_On_Result]![Year] AS [Year], stages.Class_S, stages.Classroom_S, [Forms]![Operations_On_Result]![Periods] AS Periods FROM stages WHERE ((([Forms]![Operations_On_Result]![Year])=[Forms]![Operations_On_Result]![Year]) AND (([Forms]![Operations_On_Result]![Periods])=[Forms]![Operations_On_Result]![Periods]) AND (([File_No_S] & [Forms]![Operations_On_Result]![Year] & [Class_S] & [Classroom_S] & [Forms]![Operations_On_Result]![Periods]) Not In (SELECT [File_No_B] & [Academic_Year_B] & [Class_B] & [Classroom_B] & [Periods_B] AS Not2 FROM Obtained_Basic))); ما هز المطلوب .... رجاءا اشرح وباسهاب ...
ibnjabalsoftware قام بنشر فبراير 7, 2023 الكاتب قام بنشر فبراير 7, 2023 1 ساعه مضت, kanory said: INSERT INTO Obtained_Basic ( File_No_B, Academic_Year_B, Class_B, Classroom_B, Periods_B ) SELECT stages.File_No_S, [Forms]![Operations_On_Result]![Year] AS [Year], stages.Class_S, stages.Classroom_S, [Forms]![Operations_On_Result]![Periods] AS Periods FROM stages WHERE ((([Forms]![Operations_On_Result]![Year])=[Forms]![Operations_On_Result]![Year]) AND (([Forms]![Operations_On_Result]![Periods])=[Forms]![Operations_On_Result]![Periods]) AND (([File_No_S] & [Forms]![Operations_On_Result]![Year] & [Class_S] & [Classroom_S] & [Forms]![Operations_On_Result]![Periods]) Not In (SELECT [File_No_B] & [Academic_Year_B] & [Class_B] & [Classroom_B] & [Periods_B] AS Not2 FROM Obtained_Basic))); ما هز المطلوب .... رجاءا اشرح وباسهاب ...
ibnjabalsoftware قام بنشر فبراير 7, 2023 الكاتب قام بنشر فبراير 7, 2023 هذا الكود عبارة عن استعلام اجرائي يقوم بوظيفة الحاق معلومات جدول الي احر الاستعلام يعتمد علي نموزج اسمه Operations_On_Result به عدد 2 قائمة منسدلة يقومان بتمرير قيم مختلفة للاستعلام الالحاقي وكل شي تمام التمام الان, ibnjabalsoftware said: 1 ساعه مضت, kanory said: INSERT INTO Obtained_Basic ( File_No_B, Academic_Year_B, Class_B, Classroom_B, Periods_B ) SELECT stages.File_No_S, [Forms]![Operations_On_Result]![Year] AS [Year], stages.Class_S, stages.Classroom_S, [Forms]![Operations_On_Result]![Periods] AS Periods FROM stages WHERE ((([Forms]![Operations_On_Result]![Year])=[Forms]![Operations_On_Result]![Year]) AND (([Forms]![Operations_On_Result]![Periods])=[Forms]![Operations_On_Result]![Periods]) AND (([File_No_S] & [Forms]![Operations_On_Result]![Year] & [Class_S] & [Classroom_S] & [Forms]![Operations_On_Result]![Periods]) Not In (SELECT [File_No_B] & [Academic_Year_B] & [Class_B] & [Classroom_B] & [Periods_B] AS Not2 FROM Obtained_Basic))); ما هز المطلوب .... رجاءا اشرح وباسهاب ... Expand الان كل ماهو مطلوب (تنسيق هذا الاستعلام وتحويله لكود vba ) بدلا من الاستعلام بطبيعته الحالية مرفق نموزج به المعطيات والمطلوب Periods.accdb
kkhalifa1960 قام بنشر فبراير 7, 2023 قام بنشر فبراير 7, 2023 DoCmd.SetWarnings True SQL = "INSERT INTO Obtained_Basic (File_No_B, Academic_Year_B, Class_B, Classroom_B, Periods_B)" & _ "SELECT stages.File_No_S, [Forms]![Operations_On_Result]![Year] AS [Year], stages.Class_S, stages.Classroom_S, [Forms]![Operations_On_Result]![Periods] AS Periods" & _ "FROM stages INNER JOIN stages ON stages.File_No_S=Obtained_Basic.File_No_B " & _ "WHERE [Forms]![Operations_On_Result]![Year])=[Forms]![Operations_On_Result]![Year] AND [Forms]![Operations_On_Result]![Periods]=[Forms]![Operations_On_Result]![Periods]AND [File_No_S] & [Forms]![Operations_On_Result]![Year] & [Class_S] & [Classroom_S] & [Forms]![Operations_On_Result]![Periods]) Not In (SELECT [File_No_B] & [Academic_Year_B] & [Class_B] & [Classroom_B] & [Periods_B] AS Not2" & _ "FROM Obtained_Basic;" DoCmd.RunSQL SQL DoCmd.SetWarnings False اضف قيل الكود (DoCmd.SetWarnings True) وفي نهاية الكود (DoCmd.SetWarnings False)
ibnjabalsoftware قام بنشر فبراير 7, 2023 الكاتب قام بنشر فبراير 7, 2023 اولا شاكر لاهتمامك لكن الكود لايعمل بالصورة المطلوبة اعزرني @kkhalifa1960 هل قمت بتجربة الكود وهلي حاولت النقل بعد التجربة الاولي مع تغير احد القائمتين المنسدلتين السنة او الفترة مع وافر شكري وتقديري
الردود الموصى بها
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.