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)));