SELECT Sale_Rights_broadcasting.ID_Film, Sale_Film_Nams.Film_Name, Sale_Rights_broadcasting.Date_First, Sale_Rights_broadcasting.Date_Last, Sale_Rights_broadcasting.Agreement, Sale_Rights_broadcasting.Region_Name, Sale_Rights_broadcasting.Type_Payment, Sale_Rights_broadcasting.Labels, Sale_Rights_broadcasting.Zametki, Sale_Rights_broadcasting.Plan_Real, Sale_Rights_broadcasting.Rights_Name, Sale_Rights_broadcasting.Channel_Name, Sale_Rights_broadcasting.Type_broadcasting, InStr(1,FUN_List_territory_QUERY(),[Sale_Rights_broadcasting]![Region_Name],3) AS List_territory
FROM Sale_Film_Nams RIGHT JOIN Sale_Rights_broadcasting ON Sale_Film_Nams.Id_Film_Name = Sale_Rights_broadcasting.ID_Film
WHERE (((Sale_Rights_broadcasting.Rights_Name) Like FUN_Rights_QUERY_1() Or (Sale_Rights_broadcasting.Rights_Name) Like FUN_Rights_QUERY_2()) AND ((Sale_Rights_broadcasting.Channel_Name)<>[Forms]![FRM_Free_Film]![Channel_Name]) AND ((Sale_Rights_broadcasting.Type_broadcasting)=FUN_Type_broadcasting_Air()) AND ((InStr(1,FUN_List_territory_QUERY(),[Sale_Rights_broadcasting]![Region_Name],3))=0) AND ((funOrderValidete_QUERY([Date_First],[Date_last]))=True) AND ((InStr(1,FUN_NO_Plan_QUERY(),[Sale_Rights_broadcasting]![Plan_Real],3))<>0) AND ((InStr(1,[Sale_Rights_broadcasting]![Labels],FUN_Channel_Name_QUERY(),3))=0 And (InStr(1,[Sale_Rights_broadcasting]![Labels],FUN_Channel_Name_QUERY(),3))="0" And (InStr(1,[Sale_Rights_broadcasting]![Labels],FUN_Channel_Name_QUERY(),3))="0") AND ((InStr(1,FUN_Type_Payment_Air(),[Sale_Rights_broadcasting]![Type_Payment],3))=0)) OR (((Sale_Rights_broadcasting.Rights_Name) Like FUN_Rights_QUERY_1() Or (Sale_Rights_broadcasting.Rights_Name) Like FUN_Rights_QUERY_2()) AND ((Sale_Rights_broadcasting.Channel_Name)<>[Forms]![FRM_Free_Film]![Channel_Name]) AND ((Sale_Rights_broadcasting.Type_broadcasting)=FUN_Type_broadcasting_Air()) AND ((funOrderValidete_QUERY([Date_First],[Date_last]))=True) AND ((InStr(1,FUN_NO_Plan_QUERY(),[Sale_Rights_broadcasting]![Plan_Real],3))<>0) AND ((InStr(1,[Sale_Rights_broadcasting]![Labels],FUN_Channel_Name_QUERY(),3))=0 And (InStr(1,[Sale_Rights_broadcasting]![Labels],FUN_Channel_Name_QUERY(),3))="0" And (InStr(1,[Sale_Rights_broadcasting]![Labels],FUN_Channel_Name_QUERY(),3))="0") AND ((InStr(1,FUN_Type_Payment_Air(),[Sale_Rights_broadcasting]![Type_Payment],3))=0) AND ((nz([Sale_Rights_broadcasting]![Region_Name]))="")) OR (((Sale_Rights_broadcasting.Rights_Name) Like FUN_Rights_QUERY_1() Or (Sale_Rights_broadcasting.Rights_Name) Like FUN_Rights_QUERY_2()) AND ((Sale_Rights_broadcasting.Channel_Name)<>[Forms]![FRM_Free_Film]![Channel_Name]) AND ((Sale_Rights_broadcasting.Type_broadcasting)=FUN_Type_broadcasting_Sputnik()) AND ((InStr(1,FUN_List_territory_QUERY(),[Sale_Rights_broadcasting]![Region_Name],3))=0) AND ((funOrderValidete_QUERY([Date_First],[Date_last]))=True) AND ((InStr(1,FUN_NO_Plan_QUERY(),[Sale_Rights_broadcasting]![Plan_Real],3))<>0) AND ((InStr(1,[Sale_Rights_broadcasting]![Labels],FUN_Channel_Name_QUERY(),3))=0 And (InStr(1,[Sale_Rights_broadcasting]![Labels],FUN_Channel_Name_QUERY(),3))="0" And (InStr(1,[Sale_Rights_broadcasting]![Labels],FUN_Channel_Name_QUERY(),3))="0") AND ((InStr(1,FUN_Type_Payment_Sputnik(),[Sale_Rights_broadcasting]![Type_Payment],3))=0)) OR (((Sale_Rights_broadcasting.Rights_Name) Like FUN_Rights_QUERY_1() Or (Sale_Rights_broadcasting.Rights_Name) Like FUN_Rights_QUERY_2()) AND ((Sale_Rights_broadcasting.Channel_Name)<>[Forms]![FRM_Free_Film]![Channel_Name]) AND ((Sale_Rights_broadcasting.Type_broadcasting)=FUN_Type_broadcasting_Sputnik()) AND ((funOrderValidete_QUERY([Date_First],[Date_last]))=True) AND ((InStr(1,FUN_NO_Plan_QUERY(),[Sale_Rights_broadcasting]![Plan_Real],3))<>0) AND ((InStr(1,[Sale_Rights_broadcasting]![Labels],FUN_Channel_Name_QUERY(),3))=0 And (InStr(1,[Sale_Rights_broadcasting]![Labels],FUN_Channel_Name_QUERY(),3))="0" And (InStr(1,[Sale_Rights_broadcasting]![Labels],FUN_Channel_Name_QUERY(),3))="0") AND ((nz([Sale_Rights_broadcasting]![Region_Name]))="") AND ((InStr(1,FUN_Type_Payment_Sputnik(),[Sale_Rights_broadcasting]![Type_Payment],3))=0)) OR (((Sale_Rights_broadcasting.Rights_Name) Like FUN_Rights_QUERY_1() Or (Sale_Rights_broadcasting.Rights_Name) Like FUN_Rights_QUERY_2()) AND ((Sale_Rights_broadcasting.Channel_Name)<>[Forms]![FRM_Free_Film]![Channel_Name]) AND ((Sale_Rights_broadcasting.Type_broadcasting)=FUN_Type_broadcasting_Kabel()) AND ((InStr(1,FUN_List_territory_QUERY(),[Sale_Rights_broadcasting]![Region_Name],3))=0) AND ((funOrderValidete_QUERY([Date_First],[Date_last]))=True) AND ((InStr(1,FUN_NO_Plan_QUERY(),[Sale_Rights_broadcasting]![Plan_Real],3))<>0) AND ((InStr(1,[Sale_Rights_broadcasting]![Labels],FUN_Channel_Name_QUERY(),3))=0 And (InStr(1,[Sale_Rights_broadcasting]![Labels],FUN_Channel_Name_QUERY(),3))="0" And (InStr(1,[Sale_Rights_broadcasting]![Labels],FUN_Channel_Name_QUERY(),3))="0") AND ((InStr(1,FUN_Type_Payment_Kabel(),[Sale_Rights_broadcasting]![Type_Payment],3))=0)) OR (((Sale_Rights_broadcasting.Rights_Name) Like FUN_Rights_QUERY_1() Or (Sale_Rights_broadcasting.Rights_Name) Like FUN_Rights_QUERY_2()) AND ((Sale_Rights_broadcasting.Channel_Name)<>[Forms]![FRM_Free_Film]![Channel_Name]) AND ((Sale_Rights_broadcasting.Type_broadcasting)=FUN_Type_broadcasting_Kabel()) AND ((funOrderValidete_QUERY([Date_First],[Date_last]))=True) AND ((InStr(1,FUN_NO_Plan_QUERY(),[Sale_Rights_broadcasting]![Plan_Real],3))<>0) AND ((InStr(1,[Sale_Rights_broadcasting]![Labels],FUN_Channel_Name_QUERY(),3))=0 And (InStr(1,[Sale_Rights_broadcasting]![Labels],FUN_Channel_Name_QUERY(),3))="0" And (InStr(1,[Sale_Rights_broadcasting]![Labels],FUN_Channel_Name_QUERY(),3))="0") AND ((nz([Sale_Rights_broadcasting]![Region_Name]))="") AND ((InStr(1,FUN_Type_Payment_Kabel(),[Sale_Rights_broadcasting]![Type_Payment],3))=0))
WITH OWNERACCESS OPTION;
|