AccessTr.neT

Tam Versiyon: Düzenlenen Rapor Verilerinin Tekrar Etmesi
Şu anda arşiv modunu görüntülemektesiniz. Tam versiyonu görüntülemek için buraya tıklayınız.
Sayfalar: 1 2 3
Uygulamanıza yeni rapor oluşturdum.
Peki sayın hocam içine veri gelmeyen tabloları görünmez yapabilir miyiz? Mesela en son oluşan tablolara hiç veri gelmiyor ve onların görünmesini istemiyorum.
Mesela hangi alanda veri yoksa satır görünmeyecek? Son kayıtta rkat1 boş,
(20/04/2020, 14:06)ozanakkaya yazdı: [ -> ]Mesela hangi alanda veri yoksa satır görünmeyecek? Son kayıtta rkat1 boş,
3. sayfa ya hiç işlem gelmiyor mesela. bunu isteme sebebim veri tabanı değişken oluyor programda. ondan dolayı bazen sadece 2 tablo oluyor bazen 3 tane oluyor. ben herzaman 5 tane tablo oluşturduğum için geriye kalanlar boş ve işlem yokmuş gibi geliyor. mesela anaformda cmb_atur da veri yoksa yada anaform da isl kutusunda veti yoksa gizlensin istiyorum.
Sorgu kodunu aşağıdaki ile değiştirerek dene,

SELECT
IIf(IsNull([Formlar]![frm_Anaform]![isl1]),"K" ,[Formlar]![frm_Anaform]![isl1] & "-" & [Formlar]![frm_Anaform]![agad1] & " " & "İşletme Sınıfında Ortalama Bonitet Tayini ve Redüktif Alan Hesabı:") AS Baslik,
DLookUp("Des_NomVal_Name_L1","Des_NomVal","Des_ID=48") AS sinif1,DLookUp("Des_NomVal_Name_L1","Des_NomVal","Des_ID=49") AS sinif2,DLookUp("Des_NomVal_Name_L1","Des_NomVal","Des_ID=50") AS sinif3,DLookUp("Des_NomVal_Name_L1","Des_NomVal","Des_ID=51") AS sinif4,DLookUp("Des_NomVal_Name_L1","Des_NomVal","Des_ID=52") AS sinif5,
IIf(IsNull(DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl1] and TURAD=[Formlar]![frm_Anaform]![cmb_atur1] and BONITET=1")),0,DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl1] and TURAD=[Formlar]![frm_Anaform]![cmb_atur1] and BONITET=1")) AS a1,IIf(IsNull(DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl1] and TURAD=[Formlar]![frm_Anaform]![cmb_atur1] and BONITET=2")),0,DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl1] and TURAD=[Formlar]![frm_Anaform]![cmb_atur1] and BONITET=2")) AS a2,IIf(IsNull(DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl1] and TURAD=[Formlar]![frm_Anaform]![cmb_atur1] and BONITET=3")),0,DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl1] and TURAD=[Formlar]![frm_Anaform]![cmb_atur1] and BONITET=3")) AS a3,IIf(IsNull(DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl1] and TURAD=[Formlar]![frm_Anaform]![cmb_atur1] and BONITET=4")),0,DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl1] and TURAD=[Formlar]![frm_Anaform]![cmb_atur1] and BONITET=4")) AS a4,IIf(IsNull(DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl1] and TURAD=[Formlar]![frm_Anaform]![cmb_atur1] and BONITET=5")),0,DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl1] and TURAD=[Formlar]![frm_Anaform]![cmb_atur1] and BONITET=5")) AS a5,
DLookUp("ALT","BON_ENDX","BONITET=1 and TUR_KOD=[Formlar]![frm_Anaform]![agk1]") & "-" & Dlookup ("UST","BON_ENDX","BONITET=1 and TUR_KOD=[Formlar]![frm_Anaform]![agk1]") AS b1, Dlookup ("ALT","BON_ENDX","BONITET=2 and TUR_KOD=[Formlar]![frm_Anaform]![agk1]") & "-" & Dlookup ("UST","BON_ENDX","BONITET=2 and TUR_KOD=[Formlar]![frm_Anaform]![agk1]") AS b2,DLookUp("ALT","BON_ENDX","BONITET=3 and TUR_KOD=[Formlar]![frm_Anaform]![agk1]") & "-" & Dlookup ("UST","BON_ENDX","BONITET=3 and TUR_KOD=[Formlar]![frm_Anaform]![agk1]") AS b3,DLookUp("ALT","BON_ENDX","BONITET=4 and TUR_KOD=[Formlar]![frm_Anaform]![agk1]") & "-" & Dlookup ("UST","BON_ENDX","BONITET=4 and TUR_KOD=[Formlar]![frm_Anaform]![agk1]") AS b4,DLookUp("ALT","BON_ENDX","BONITET=5 and TUR_KOD=[Formlar]![frm_Anaform]![agk1]") & "-" & Dlookup ("UST","BON_ENDX","BONITET=5 and TUR_KOD=[Formlar]![frm_Anaform]![agk1]") AS b5,
IIf(IsNull(DLookUp("ORTA","BON_ENDX","BONITET=1 and TUR_KOD=[Formlar]![frm_Anaform]![agk1]")),0,DLookUp("ORTA","BON_ENDX","BONITET=1 and TUR_KOD=[Formlar]![frm_Anaform]![agk1]")) AS e1,IIf(IsNull(DLookUp("ORTA","BON_ENDX","BONITET=2 and TUR_KOD=[Formlar]![frm_Anaform]![agk1]")),0,DLookUp("ORTA","BON_ENDX","BONITET=2 and TUR_KOD=[Formlar]![frm_Anaform]![agk1]")) AS e2,IIf(IsNull(DLookUp("ORTA","BON_ENDX","BONITET=3 and TUR_KOD=[Formlar]![frm_Anaform]![agk1]")),0,DLookUp("ORTA","BON_ENDX","BONITET=3 and TUR_KOD=[Formlar]![frm_Anaform]![agk1]")) AS e3,IIf(IsNull(DLookUp("ORTA","BON_ENDX","BONITET=4 and TUR_KOD=[Formlar]![frm_Anaform]![agk1]")),0,DLookUp("ORTA","BON_ENDX","BONITET=4 and TUR_KOD=[Formlar]![frm_Anaform]![agk1]")) AS e4,IIf(IsNull(DLookUp("ORTA","BON_ENDX","BONITET=5 and TUR_KOD=[Formlar]![frm_Anaform]![agk1]")),0,DLookUp("ORTA","BON_ENDX","BONITET=5 and TUR_KOD=[Formlar]![frm_Anaform]![agk1]")) AS e5,DLookUp("Round([1],2)","REDUK","ISL_SIN=[Formlar]![frm_Anaform]![isl1]") AS rkat1,DLookUp("Round([2],2)","REDUK","ISL_SIN=[Formlar]![frm_Anaform]![isl1]") AS rkat2,DLookUp("Round([3],2)","REDUK","ISL_SIN=[Formlar]![frm_Anaform]![isl1]") AS rkat3,DLookUp("Round([4],2)","REDUK","ISL_SIN=[Formlar]![frm_Anaform]![isl1]") AS rkat4,DLookUp("Round([5],2)","REDUK","ISL_SIN=[Formlar]![frm_Anaform]![isl1]") AS rkat5,
IIf(IsNull(DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl1] and TURAD=[Formlar]![frm_Anaform]![cmb_atur1] and BONITET=1")),0,DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl1] and TURAD=[Formlar]![frm_Anaform]![cmb_atur1] and BONITET=1")) AS reduka1,
IIf(IsNull(DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl1] and TURAD=[Formlar]![frm_Anaform]![cmb_atur1] and BONITET=2")),0,DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl1] and TURAD=[Formlar]![frm_Anaform]![cmb_atur1] and BONITET=2")) AS reduka2,
IIf(IsNull(DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl1] and TURAD=[Formlar]![frm_Anaform]![cmb_atur1] and BONITET=3")),0,DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl1] and TURAD=[Formlar]![frm_Anaform]![cmb_atur1] and BONITET=3")) AS reduka3,
IIf(IsNull(DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl1] and TURAD=[Formlar]![frm_Anaform]![cmb_atur1] and BONITET=4")),0,DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl1] and TURAD=[Formlar]![frm_Anaform]![cmb_atur1] and BONITET=4")) AS reduka4,
IIf(IsNull(DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl1] and TURAD=[Formlar]![frm_Anaform]![cmb_atur1] and BONITET=5")),0,DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl1] and TURAD=[Formlar]![frm_Anaform]![cmb_atur1] and BONITET=5")) AS reduka5,
DLookUp("ALT","BON_ENDX","BONITET=[Formlar]![frm_Anaform]![boni1] and TUR_KOD=[Formlar]![frm_Anaform]![agk1]") & " - " & Dlookup ("UST","BON_ENDX","BONITET=[Formlar]![frm_Anaform]![boni1] and TUR_KOD=[Formlar]![frm_Anaform]![agk1]") AS bonar,
IIf(IsNull([Formlar]![frm_Anaform]![isl1]),"0","1") AS x, IIf(IsNull([Formlar]![frm_Anaform]![cmb_atur1]),"0","1") AS y
FROM SERVET
GROUP BY IIf(IsNull([Formlar]![frm_Anaform]![isl1]),"K" ,[Formlar]![frm_Anaform]![isl1] & "-" & [Formlar]![frm_Anaform]![agad1] & " " & "İşletme Sınıfında Ortalama Bonitet Tayini ve Redüktif Alan Hesabı:"), Dlookup ("Des_NomVal_Name_L1","Des_NomVal","Des_ID=48"), IIf(IsNull(DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl1] and TURAD=[Formlar]![frm_Anaform]![cmb_atur1] and BONITET=1")),0,DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl1] and TURAD=[Formlar]![frm_Anaform]![cmb_atur1] and BONITET=1")), Dlookup ("ALT","BON_ENDX","BONITET=1 and TUR_KOD=[Formlar]![frm_Anaform]![agk1]") & "-" & Dlookup ("UST","BON_ENDX","BONITET=1 and TUR_KOD=[Formlar]![frm_Anaform]![agk1]"), IIf(IsNull(DLookUp("ORTA","BON_ENDX","BONITET=1 and TUR_KOD=[Formlar]![frm_Anaform]![agk1]")),0,DLookUp("ORTA","BON_ENDX","BONITET=1 and TUR_KOD=[Formlar]![frm_Anaform]![agk1]")),DLookUp("Round([1],2)","REDUK","ISL_SIN=[Formlar]![frm_Anaform]![isl1]"),
IIf(IsNull(DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl1] and TURAD=[Formlar]![frm_Anaform]![cmb_atur1] and BONITET=1")),0,DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl1] and TURAD=[Formlar]![frm_Anaform]![cmb_atur1] and BONITET=1")),DLookUp("ALT","BON_ENDX","BONITET=[Formlar]![frm_Anaform]![boni1] and TUR_KOD=[Formlar]![frm_Anaform]![agk1]") & " - " & Dlookup ("UST","BON_ENDX","BONITET=[Formlar]![frm_Anaform]![boni1] and TUR_KOD=[Formlar]![frm_Anaform]![agk1]")
HAVING (((IIf(IsNull([Formlar]![frm_Anaform]![isl1]),"0","1"))="1") AND ((IIf(IsNull([Formlar]![frm_Anaform]![cmb_atur1]),"0","1"))="1"));

UNION

SELECT
IIf(IsNull([Formlar]![frm_Anaform]![isl2]),"L" ,[Formlar]![frm_Anaform]![isl2] & "-" & [Formlar]![frm_Anaform]![agad2] & " " & "İşletme Sınıfında Ortalama Bonitet Tayini ve Redüktif Alan Hesabı:") AS Baslik,DLookUp("Des_NomVal_Name_L1","Des_NomVal","Des_ID=48") AS sinif1,DLookUp("Des_NomVal_Name_L1","Des_NomVal","Des_ID=49") AS sinif2,DLookUp("Des_NomVal_Name_L1","Des_NomVal","Des_ID=50") AS sinif3,DLookUp("Des_NomVal_Name_L1","Des_NomVal","Des_ID=51") AS sinif4,DLookUp("Des_NomVal_Name_L1","Des_NomVal","Des_ID=52") AS sinif5, IIf(IsNull(DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl2] and TURAD=[Formlar]![frm_Anaform]![cmb_atur2] and BONITET=1")),0,DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl2] and TURAD=[Formlar]![frm_Anaform]![cmb_atur2] and BONITET=1")) AS a1, IIf(IsNull(DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl2] and TURAD=[Formlar]![frm_Anaform]![cmb_atur2] and BONITET=2")),0,DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl2] and TURAD=[Formlar]![frm_Anaform]![cmb_atur2] and BONITET=2")) AS a2,IIf(IsNull(DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl2] and TURAD=[Formlar]![frm_Anaform]![cmb_atur2] and BONITET=3")),0,DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl2] and TURAD=[Formlar]![frm_Anaform]![cmb_atur2] and BONITET=3")) AS a3,IIf(IsNull(DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl2] and TURAD=[Formlar]![frm_Anaform]![cmb_atur2] and BONITET=4")),0,DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl2] and TURAD=[Formlar]![frm_Anaform]![cmb_atur2] and BONITET=4")) AS a4,IIf(IsNull(DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl2] and TURAD=[Formlar]![frm_Anaform]![cmb_atur2] and BONITET=5")),0,DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl2] and TURAD=[Formlar]![frm_Anaform]![cmb_atur2] and BONITET=5")) AS a5,
DLookUp("ALT","BON_ENDX","BONITET=1 and TUR_KOD=[Formlar]![frm_Anaform]![agk2]") & "-" & Dlookup ("UST","BON_ENDX","BONITET=1 and TUR_KOD=[Formlar]![frm_Anaform]![agk2]") AS b1,DLookUp("ALT","BON_ENDX","BONITET=2 and TUR_KOD=[Formlar]![frm_Anaform]![agk2]") & "-" & Dlookup ("UST","BON_ENDX","BONITET=2 and TUR_KOD=[Formlar]![frm_Anaform]![agk2]") AS b2,DLookUp("ALT","BON_ENDX","BONITET=3 and TUR_KOD=[Formlar]![frm_Anaform]![agk2]") & "-" & Dlookup ("UST","BON_ENDX","BONITET=3 and TUR_KOD=[Formlar]![frm_Anaform]![agk2]") AS b3,DLookUp("ALT","BON_ENDX","BONITET=4 and TUR_KOD=[Formlar]![frm_Anaform]![agk2]") & "-" & Dlookup ("UST","BON_ENDX","BONITET=4 and TUR_KOD=[Formlar]![frm_Anaform]![agk2]") AS b4,DLookUp("ALT","BON_ENDX","BONITET=5 and TUR_KOD=[Formlar]![frm_Anaform]![agk2]") & "-" & Dlookup ("UST","BON_ENDX","BONITET=5 and TUR_KOD=[Formlar]![frm_Anaform]![agk2]") AS b5,
IIf(IsNull(DLookUp("ORTA","BON_ENDX","BONITET=1 and TUR_KOD=[Formlar]![frm_Anaform]![agk2]")),0,DLookUp("ORTA","BON_ENDX","BONITET=1 and TUR_KOD=[Formlar]![frm_Anaform]![agk2]")) AS e1, IIf(IsNull(DLookUp("ORTA","BON_ENDX","BONITET=2 and TUR_KOD=[Formlar]![frm_Anaform]![agk2]")),0,DLookUp("ORTA","BON_ENDX","BONITET=2 and TUR_KOD=[Formlar]![frm_Anaform]![agk2]")) AS e2,IIf(IsNull(DLookUp("ORTA","BON_ENDX","BONITET=3 and TUR_KOD=[Formlar]![frm_Anaform]![agk2]")),0,DLookUp("ORTA","BON_ENDX","BONITET=3 and TUR_KOD=[Formlar]![frm_Anaform]![agk2]")) AS e3,IIf(IsNull(DLookUp("ORTA","BON_ENDX","BONITET=4 and TUR_KOD=[Formlar]![frm_Anaform]![agk2]")),0,DLookUp("ORTA","BON_ENDX","BONITET=4 and TUR_KOD=[Formlar]![frm_Anaform]![agk2]")) AS e4,IIf(IsNull(DLookUp("ORTA","BON_ENDX","BONITET=5 and TUR_KOD=[Formlar]![frm_Anaform]![agk2]")),0,DLookUp("ORTA","BON_ENDX","BONITET=5 and TUR_KOD=[Formlar]![frm_Anaform]![agk2]")) AS e5,DLookUp("Round([1],2)","REDUK","ISL_SIN=[Formlar]![frm_Anaform]![isl2]") AS rkat1,DLookUp("Round([2],2)","REDUK","ISL_SIN=[Formlar]![frm_Anaform]![isl2]") AS rkat2,DLookUp("Round([3],2)","REDUK","ISL_SIN=[Formlar]![frm_Anaform]![isl2]") AS rkat3,DLookUp("Round([4],2)","REDUK","ISL_SIN=[Formlar]![frm_Anaform]![isl2]") AS rkat4,DLookUp("Round([5],2)","REDUK","ISL_SIN=[Formlar]![frm_Anaform]![isl2]") AS rkat5,
IIf(IsNull(DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl2] and TURAD=[Formlar]![frm_Anaform]![cmb_atur2] and BONITET=1")),0,DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl2] and TURAD=[Formlar]![frm_Anaform]![cmb_atur2] and BONITET=1")) AS reduka1,
IIf(IsNull(DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl2] and TURAD=[Formlar]![frm_Anaform]![cmb_atur2] and BONITET=2")),0,DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl2] and TURAD=[Formlar]![frm_Anaform]![cmb_atur2] and BONITET=2")) AS reduka2,
IIf(IsNull(DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl2] and TURAD=[Formlar]![frm_Anaform]![cmb_atur2] and BONITET=3")),0,DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl2] and TURAD=[Formlar]![frm_Anaform]![cmb_atur2] and BONITET=3")) AS reduka3,
IIf(IsNull(DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl2] and TURAD=[Formlar]![frm_Anaform]![cmb_atur2] and BONITET=4")),0,DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl2] and TURAD=[Formlar]![frm_Anaform]![cmb_atur2] and BONITET=4")) AS reduka4,
IIf(IsNull(DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl2] and TURAD=[Formlar]![frm_Anaform]![cmb_atur2] and BONITET=5")),0,DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl2] and TURAD=[Formlar]![frm_Anaform]![cmb_atur2] and BONITET=5")) AS reduka5,
DLookUp("ALT","BON_ENDX","BONITET=[Formlar]![frm_Anaform]![boni2] and TUR_KOD=[Formlar]![frm_Anaform]![agk2]") & " - " & Dlookup ("UST","BON_ENDX","BONITET=[Formlar]![frm_Anaform]![boni2] and TUR_KOD=[Formlar]![frm_Anaform]![agk2]") AS bonar,
IIf(IsNull([Formlar]![frm_Anaform]![isl2]),"0","1") AS x, IIf(IsNull([Formlar]![frm_Anaform]![cmb_atur2]),"0","1") AS y

FROM SERVET
GROUP BY IIf(IsNull([Formlar]![frm_Anaform]![isl2]),"L" ,[Formlar]![frm_Anaform]![isl2] & "-" & [Formlar]![frm_Anaform]![agad2] & " " & "İşletme Sınıfında Ortalama Bonitet Tayini ve Redüktif Alan Hesabı:"),DLookUp("Des_NomVal_Name_L1","Des_NomVal","Des_ID=48"), IIf(IsNull(DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl2] and TURAD=[Formlar]![frm_Anaform]![cmb_atur2] and BONITET=1")),0,DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl2] and TURAD=[Formlar]![frm_Anaform]![cmb_atur2] and BONITET=1")), Dlookup ("ALT","BON_ENDX","BONITET=1 and TUR_KOD=[Formlar]![frm_Anaform]![agk2]") & "-" & Dlookup ("UST","BON_ENDX","BONITET=1 and TUR_KOD=[Formlar]![frm_Anaform]![agk2]"), IIf(IsNull(DLookUp("ORTA","BON_ENDX","BONITET=1 and TUR_KOD=[Formlar]![frm_Anaform]![agk2]")),0,DLookUp("ORTA","BON_ENDX","BONITET=1 and TUR_KOD=[Formlar]![frm_Anaform]![agk2]")),DLookUp("Round([1],2)","REDUK","ISL_SIN=[Formlar]![frm_Anaform]![isl2]"),
IIf(IsNull(DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl2] and TURAD=[Formlar]![frm_Anaform]![cmb_atur2] and BONITET=1")),0,DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl2] and TURAD=[Formlar]![frm_Anaform]![cmb_atur2] and BONITET=1")),DLookUp("ALT","BON_ENDX","BONITET=[Formlar]![frm_Anaform]![boni2] and TUR_KOD=[Formlar]![frm_Anaform]![agk2]") & " - " & Dlookup ("UST","BON_ENDX","BONITET=[Formlar]![frm_Anaform]![boni2] and TUR_KOD=[Formlar]![frm_Anaform]![agk2]")
HAVING (((IIf(IsNull([Formlar]![frm_Anaform]![isl2]),"0","1"))="1") AND ((IIf(IsNull([Formlar]![frm_Anaform]![cmb_atur2]),"0","1"))="1"));

UNION

SELECT
IIf(IsNull([Formlar]![frm_Anaform]![isl3]),"M" ,[Formlar]![frm_Anaform]![isl3] & "-" & [Formlar]![frm_Anaform]![agad3] & " " & "İşletme Sınıfında Ortalama Bonitet Tayini ve Redüktif Alan Hesabı:") AS Baslik,
DLookUp("Des_NomVal_Name_L1","Des_NomVal","Des_ID=48") AS sinif1,DLookUp("Des_NomVal_Name_L1","Des_NomVal","Des_ID=49") AS sinif2,DLookUp("Des_NomVal_Name_L1","Des_NomVal","Des_ID=50") AS sinif3,DLookUp("Des_NomVal_Name_L1","Des_NomVal","Des_ID=51") AS sinif4,DLookUp("Des_NomVal_Name_L1","Des_NomVal","Des_ID=52") AS sinif5, IIf(IsNull(DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl3] and TURAD=[Formlar]![frm_Anaform]![cmb_atur3] and BONITET=1")),0,DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl3] and TURAD=[Formlar]![frm_Anaform]![cmb_atur3] and BONITET=1")) AS a1, IIf(IsNull(DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl3] and TURAD=[Formlar]![frm_Anaform]![cmb_atur3] and BONITET=2")),0,DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl3] and TURAD=[Formlar]![frm_Anaform]![cmb_atur3] and BONITET=2")) AS a2,IIf(IsNull(DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl3] and TURAD=[Formlar]![frm_Anaform]![cmb_atur3] and BONITET=3")),0,DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl3] and TURAD=[Formlar]![frm_Anaform]![cmb_atur3] and BONITET=3")) AS a3,IIf(IsNull(DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl3] and TURAD=[Formlar]![frm_Anaform]![cmb_atur3] and BONITET=4")),0,DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl3] and TURAD=[Formlar]![frm_Anaform]![cmb_atur3] and BONITET=4")) AS a4,IIf(IsNull(DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl3] and TURAD=[Formlar]![frm_Anaform]![cmb_atur3] and BONITET=5")),0,DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl3] and TURAD=[Formlar]![frm_Anaform]![cmb_atur3] and BONITET=5")) AS a5,
DLookUp("ALT","BON_ENDX","BONITET=1 and TUR_KOD=[Formlar]![frm_Anaform]![agk3]") & "-" & Dlookup ("UST","BON_ENDX","BONITET=1 and TUR_KOD=[Formlar]![frm_Anaform]![agk3]") AS b1,DLookUp("ALT","BON_ENDX","BONITET=2 and TUR_KOD=[Formlar]![frm_Anaform]![agk3]") & "-" & Dlookup ("UST","BON_ENDX","BONITET=2 and TUR_KOD=[Formlar]![frm_Anaform]![agk3]") AS b2,DLookUp("ALT","BON_ENDX","BONITET=3 and TUR_KOD=[Formlar]![frm_Anaform]![agk3]") & "-" & Dlookup ("UST","BON_ENDX","BONITET=3 and TUR_KOD=[Formlar]![frm_Anaform]![agk3]") AS b3,DLookUp("ALT","BON_ENDX","BONITET=4 and TUR_KOD=[Formlar]![frm_Anaform]![agk3]") & "-" & Dlookup ("UST","BON_ENDX","BONITET=4 and TUR_KOD=[Formlar]![frm_Anaform]![agk3]") AS b4,DLookUp("ALT","BON_ENDX","BONITET=5 and TUR_KOD=[Formlar]![frm_Anaform]![agk3]") & "-" & Dlookup ("UST","BON_ENDX","BONITET=5 and TUR_KOD=[Formlar]![frm_Anaform]![agk3]") AS b5,
IIf(IsNull(DLookUp("ORTA","BON_ENDX","BONITET=1 and TUR_KOD=[Formlar]![frm_Anaform]![agk3]")),0,DLookUp("ORTA","BON_ENDX","BONITET=1 and TUR_KOD=[Formlar]![frm_Anaform]![agk3]")) AS e1, IIf(IsNull(DLookUp("ORTA","BON_ENDX","BONITET=2 and TUR_KOD=[Formlar]![frm_Anaform]![agk3]")),0,DLookUp("ORTA","BON_ENDX","BONITET=2 and TUR_KOD=[Formlar]![frm_Anaform]![agk3]")) AS e2,IIf(IsNull(DLookUp("ORTA","BON_ENDX","BONITET=3 and TUR_KOD=[Formlar]![frm_Anaform]![agk3]")),0,DLookUp("ORTA","BON_ENDX","BONITET=3 and TUR_KOD=[Formlar]![frm_Anaform]![agk3]")) AS e3,IIf(IsNull(DLookUp("ORTA","BON_ENDX","BONITET=4 and TUR_KOD=[Formlar]![frm_Anaform]![agk3]")),0,DLookUp("ORTA","BON_ENDX","BONITET=4 and TUR_KOD=[Formlar]![frm_Anaform]![agk3]")) AS e4,IIf(IsNull(DLookUp("ORTA","BON_ENDX","BONITET=5 and TUR_KOD=[Formlar]![frm_Anaform]![agk3]")),0,DLookUp("ORTA","BON_ENDX","BONITET=5 and TUR_KOD=[Formlar]![frm_Anaform]![agk3]")) AS e5,DLookUp("Round([1],2)","REDUK","ISL_SIN=[Formlar]![frm_Anaform]![isl3]") AS rkat1,DLookUp("Round([2],2)","REDUK","ISL_SIN=[Formlar]![frm_Anaform]![isl3]") AS rkat2,DLookUp("Round([3],2)","REDUK","ISL_SIN=[Formlar]![frm_Anaform]![isl3]") AS rkat3,DLookUp("Round([4],2)","REDUK","ISL_SIN=[Formlar]![frm_Anaform]![isl3]") AS rkat4,DLookUp("Round([5],2)","REDUK","ISL_SIN=[Formlar]![frm_Anaform]![isl3]") AS rkat5,
IIf(IsNull(DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl3] and TURAD=[Formlar]![frm_Anaform]![cmb_atur3] and BONITET=1")),0,DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl3] and TURAD=[Formlar]![frm_Anaform]![cmb_atur3] and BONITET=1")) AS reduka1,
IIf(IsNull(DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl3] and TURAD=[Formlar]![frm_Anaform]![cmb_atur3] and BONITET=2")),0,DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl3] and TURAD=[Formlar]![frm_Anaform]![cmb_atur3] and BONITET=2")) AS reduka2,
IIf(IsNull(DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl3] and TURAD=[Formlar]![frm_Anaform]![cmb_atur3] and BONITET=3")),0,DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl3] and TURAD=[Formlar]![frm_Anaform]![cmb_atur3] and BONITET=3")) AS reduka3,
IIf(IsNull(DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl3] and TURAD=[Formlar]![frm_Anaform]![cmb_atur3] and BONITET=4")),0,DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl3] and TURAD=[Formlar]![frm_Anaform]![cmb_atur3] and BONITET=4")) AS reduka4,
IIf(IsNull(DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl3] and TURAD=[Formlar]![frm_Anaform]![cmb_atur3] and BONITET=5")),0,DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl3] and TURAD=[Formlar]![frm_Anaform]![cmb_atur3] and BONITET=5")) AS reduka5,
DLookUp("ALT","BON_ENDX","BONITET=[Formlar]![frm_Anaform]![boni3] and TUR_KOD=[Formlar]![frm_Anaform]![agk3]") & " - " & Dlookup ("UST","BON_ENDX","BONITET=[Formlar]![frm_Anaform]![boni3] and TUR_KOD=[Formlar]![frm_Anaform]![agk3]") AS bonar,
IIf(IsNull([Formlar]![frm_Anaform]![isl3]),"0","1") AS x, IIf(IsNull([Formlar]![frm_Anaform]![cmb_atur3]),"0","1") AS y
FROM SERVET
GROUP BY IIf(IsNull([Formlar]![frm_Anaform]![isl3]),"M" ,[Formlar]![frm_Anaform]![isl3] & "-" & [Formlar]![frm_Anaform]![agad3] & " " & "İşletme Sınıfında Ortalama Bonitet Tayini ve Redüktif Alan Hesabı:"),DLookUp("Des_NomVal_Name_L1","Des_NomVal","Des_ID=48"), IIf(IsNull(DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl3] and TURAD=[Formlar]![frm_Anaform]![cmb_atur3] and BONITET=1")),0,DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl3] and TURAD=[Formlar]![frm_Anaform]![cmb_atur3] and BONITET=1")), Dlookup ("ALT","BON_ENDX","BONITET=1 and TUR_KOD=[Formlar]![frm_Anaform]![agk3]") & "-" & Dlookup ("UST","BON_ENDX","BONITET=1 and TUR_KOD=[Formlar]![frm_Anaform]![agk3]"), IIf(IsNull(DLookUp("ORTA","BON_ENDX","BONITET=1 and TUR_KOD=[Formlar]![frm_Anaform]![agk3]")),0,DLookUp("ORTA","BON_ENDX","BONITET=1 and TUR_KOD=[Formlar]![frm_Anaform]![agk3]")),DLookUp("Round([1],2)","REDUK","ISL_SIN=[Formlar]![frm_Anaform]![isl3]"),IIf(IsNull(DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl3] and TURAD=[Formlar]![frm_Anaform]![cmb_atur3] and BONITET=1")),0,DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl3] and TURAD=[Formlar]![frm_Anaform]![cmb_atur3] and BONITET=1")),DLookUp("ALT","BON_ENDX","BONITET=[Formlar]![frm_Anaform]![boni3] and TUR_KOD=[Formlar]![frm_Anaform]![agk3]") & " - " & Dlookup ("UST","BON_ENDX","BONITET=[Formlar]![frm_Anaform]![boni3] and TUR_KOD=[Formlar]![frm_Anaform]![agk3]")
HAVING (((IIf(IsNull([Formlar]![frm_Anaform]![isl3]),"0","1"))="1") AND ((IIf(IsNull([Formlar]![frm_Anaform]![cmb_atur3]),"0","1"))="1"));

UNION

SELECT
IIf(IsNull([Formlar]![frm_Anaform]![isl4]),"N" ,[Formlar]![frm_Anaform]![isl4] & "-" & [Formlar]![frm_Anaform]![agad4] & " " & "İşletme Sınıfında Ortalama Bonitet Tayini ve Redüktif Alan Hesabı:") AS Baslik,
DLookUp("Des_NomVal_Name_L1","Des_NomVal","Des_ID=48") AS sinif1,DLookUp("Des_NomVal_Name_L1","Des_NomVal","Des_ID=49") AS sinif2,DLookUp("Des_NomVal_Name_L1","Des_NomVal","Des_ID=50") AS sinif3,DLookUp("Des_NomVal_Name_L1","Des_NomVal","Des_ID=51") AS sinif4,DLookUp("Des_NomVal_Name_L1","Des_NomVal","Des_ID=52") AS sinif5, IIf(IsNull(DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl4] and TURAD=[Formlar]![frm_Anaform]![cmb_atur4] and BONITET=1")),0,DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl4] and TURAD=[Formlar]![frm_Anaform]![cmb_atur4] and BONITET=1")) AS a1, IIf(IsNull(DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl4] and TURAD=[Formlar]![frm_Anaform]![cmb_atur4] and BONITET=2")),0,DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl4] and TURAD=[Formlar]![frm_Anaform]![cmb_atur4] and BONITET=2")) AS a2,IIf(IsNull(DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl4] and TURAD=[Formlar]![frm_Anaform]![cmb_atur4] and BONITET=3")),0,DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl4] and TURAD=[Formlar]![frm_Anaform]![cmb_atur4] and BONITET=3")) AS a3,IIf(IsNull(DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl4] and TURAD=[Formlar]![frm_Anaform]![cmb_atur4] and BONITET=4")),0,DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl4] and TURAD=[Formlar]![frm_Anaform]![cmb_atur4] and BONITET=4")) AS a4,IIf(IsNull(DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl4] and TURAD=[Formlar]![frm_Anaform]![cmb_atur4] and BONITET=5")),0,DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl4] and TURAD=[Formlar]![frm_Anaform]![cmb_atur4] and BONITET=5")) AS a5,
DLookUp("ALT","BON_ENDX","BONITET=1 and TUR_KOD=[Formlar]![frm_Anaform]![agk4]") & "-" & Dlookup ("UST","BON_ENDX","BONITET=1 and TUR_KOD=[Formlar]![frm_Anaform]![agk4]") AS b1,DLookUp("ALT","BON_ENDX","BONITET=2 and TUR_KOD=[Formlar]![frm_Anaform]![agk4]") & "-" & Dlookup ("UST","BON_ENDX","BONITET=2 and TUR_KOD=[Formlar]![frm_Anaform]![agk4]") AS b2,DLookUp("ALT","BON_ENDX","BONITET=3 and TUR_KOD=[Formlar]![frm_Anaform]![agk4]") & "-" & Dlookup ("UST","BON_ENDX","BONITET=3 and TUR_KOD=[Formlar]![frm_Anaform]![agk4]") AS b3,DLookUp("ALT","BON_ENDX","BONITET=4 and TUR_KOD=[Formlar]![frm_Anaform]![agk4]") & "-" & Dlookup ("UST","BON_ENDX","BONITET=4 and TUR_KOD=[Formlar]![frm_Anaform]![agk4]") AS b4,DLookUp("ALT","BON_ENDX","BONITET=5 and TUR_KOD=[Formlar]![frm_Anaform]![agk4]") & "-" & Dlookup ("UST","BON_ENDX","BONITET=5 and TUR_KOD=[Formlar]![frm_Anaform]![agk4]") AS b5,
IIf(IsNull(DLookUp("ORTA","BON_ENDX","BONITET=1 and TUR_KOD=[Formlar]![frm_Anaform]![agk4]")),0,DLookUp("ORTA","BON_ENDX","BONITET=1 and TUR_KOD=[Formlar]![frm_Anaform]![agk4]")) AS e1, IIf(IsNull(DLookUp("ORTA","BON_ENDX","BONITET=2 and TUR_KOD=[Formlar]![frm_Anaform]![agk4]")),0,DLookUp("ORTA","BON_ENDX","BONITET=2 and TUR_KOD=[Formlar]![frm_Anaform]![agk4]")) AS e2,IIf(IsNull(DLookUp("ORTA","BON_ENDX","BONITET=3 and TUR_KOD=[Formlar]![frm_Anaform]![agk4]")),0,DLookUp("ORTA","BON_ENDX","BONITET=3 and TUR_KOD=[Formlar]![frm_Anaform]![agk4]")) AS e3,IIf(IsNull(DLookUp("ORTA","BON_ENDX","BONITET=4 and TUR_KOD=[Formlar]![frm_Anaform]![agk4]")),0,DLookUp("ORTA","BON_ENDX","BONITET=4 and TUR_KOD=[Formlar]![frm_Anaform]![agk4]")) AS e4,IIf(IsNull(DLookUp("ORTA","BON_ENDX","BONITET=5 and TUR_KOD=[Formlar]![frm_Anaform]![agk4]")),0,DLookUp("ORTA","BON_ENDX","BONITET=5 and TUR_KOD=[Formlar]![frm_Anaform]![agk4]")) AS e5,DLookUp("Round([1],2)","REDUK","ISL_SIN=[Formlar]![frm_Anaform]![isl4]") AS rkat1,DLookUp("Round([2],2)","REDUK","ISL_SIN=[Formlar]![frm_Anaform]![isl4]") AS rkat2,DLookUp("Round([3],2)","REDUK","ISL_SIN=[Formlar]![frm_Anaform]![isl4]") AS rkat3,DLookUp("Round([4],2)","REDUK","ISL_SIN=[Formlar]![frm_Anaform]![isl4]") AS rkat4,DLookUp("Round([5],2)","REDUK","ISL_SIN=[Formlar]![frm_Anaform]![isl4]") AS rkat5,
IIf(IsNull(DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl4] and TURAD=[Formlar]![frm_Anaform]![cmb_atur4] and BONITET=1")),0,DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl4] and TURAD=[Formlar]![frm_Anaform]![cmb_atur4] and BONITET=1")) AS reduka1,
IIf(IsNull(DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl4] and TURAD=[Formlar]![frm_Anaform]![cmb_atur4] and BONITET=2")),0,DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl4] and TURAD=[Formlar]![frm_Anaform]![cmb_atur4] and BONITET=2")) AS reduka2,
IIf(IsNull(DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl4] and TURAD=[Formlar]![frm_Anaform]![cmb_atur4] and BONITET=3")),0,DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl4] and TURAD=[Formlar]![frm_Anaform]![cmb_atur4] and BONITET=3")) AS reduka3,
IIf(IsNull(DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl4] and TURAD=[Formlar]![frm_Anaform]![cmb_atur4] and BONITET=4")),0,DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl4] and TURAD=[Formlar]![frm_Anaform]![cmb_atur4] and BONITET=4")) AS reduka4,
IIf(IsNull(DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl4] and TURAD=[Formlar]![frm_Anaform]![cmb_atur4] and BONITET=5")),0,DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl4] and TURAD=[Formlar]![frm_Anaform]![cmb_atur4] and BONITET=5")) AS reduka5,
DLookUp("ALT","BON_ENDX","BONITET=[Formlar]![frm_Anaform]![boni4] and TUR_KOD=[Formlar]![frm_Anaform]![agk4]") & " - " & Dlookup ("UST","BON_ENDX","BONITET=[Formlar]![frm_Anaform]![boni4] and TUR_KOD=[Formlar]![frm_Anaform]![agk4]") AS bonar,
IIf(IsNull([Formlar]![frm_Anaform]![isl4]),"0","1") AS x, IIf(IsNull([Formlar]![frm_Anaform]![cmb_atur4]),"0","1") AS y
FROM SERVET
GROUP BY IIf(IsNull([Formlar]![frm_Anaform]![isl4]),"N" ,[Formlar]![frm_Anaform]![isl4] & "-" & [Formlar]![frm_Anaform]![agad4] & " " & "İşletme Sınıfında Ortalama Bonitet Tayini ve Redüktif Alan Hesabı:"), Dlookup ("Des_NomVal_Name_L1","Des_NomVal","Des_ID=48"), IIf(IsNull(DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl4] and TURAD=[Formlar]![frm_Anaform]![cmb_atur4] and BONITET=1")),0,DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl4] and TURAD=[Formlar]![frm_Anaform]![cmb_atur4] and BONITET=1")), Dlookup ("ALT","BON_ENDX","BONITET=1 and TUR_KOD=[Formlar]![frm_Anaform]![agk4]") & "-" & Dlookup ("UST","BON_ENDX","BONITET=1 and TUR_KOD=[Formlar]![frm_Anaform]![agk4]"), IIf(IsNull(DLookUp("ORTA","BON_ENDX","BONITET=1 and TUR_KOD=[Formlar]![frm_Anaform]![agk4]")),0,DLookUp("ORTA","BON_ENDX","BONITET=1 and TUR_KOD=[Formlar]![frm_Anaform]![agk4]")),DLookUp("Round([1],2)","REDUK","ISL_SIN=[Formlar]![frm_Anaform]![isl4]"),IIf(IsNull(DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl4] and TURAD=[Formlar]![frm_Anaform]![cmb_atur4] and BONITET=1")),0,DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl4] and TURAD=[Formlar]![frm_Anaform]![cmb_atur4] and BONITET=1")),DLookUp("ALT","BON_ENDX","BONITET=[Formlar]![frm_Anaform]![boni4] and TUR_KOD=[Formlar]![frm_Anaform]![agk4]") & " - " & Dlookup ("UST","BON_ENDX","BONITET=[Formlar]![frm_Anaform]![boni4] and TUR_KOD=[Formlar]![frm_Anaform]![agk4]")
HAVING (((IIf(IsNull([Formlar]![frm_Anaform]![isl4]),"0","1"))="1") AND ((IIf(IsNull([Formlar]![frm_Anaform]![cmb_atur4]),"0","1"))="1"));

UNION SELECT

IIf(IsNull([Formlar]![frm_Anaform]![isl5]),"O" ,[Formlar]![frm_Anaform]![isl5] & "-" & [Formlar]![frm_Anaform]![agad5] & " " & "İşletme Sınıfında Ortalama Bonitet Tayini ve Redüktif Alan Hesabı:") AS Baslik,
DLookUp("Des_NomVal_Name_L1","Des_NomVal","Des_ID=48") AS sinif1,DLookUp("Des_NomVal_Name_L1","Des_NomVal","Des_ID=49") AS sinif2,DLookUp("Des_NomVal_Name_L1","Des_NomVal","Des_ID=50") AS sinif3,DLookUp("Des_NomVal_Name_L1","Des_NomVal","Des_ID=51") AS sinif4,DLookUp("Des_NomVal_Name_L1","Des_NomVal","Des_ID=52") AS sinif5, IIf(IsNull(DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl5] and TURAD=[Formlar]![frm_Anaform]![cmb_atur5] and BONITET=1")),0,DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl5] and TURAD=[Formlar]![frm_Anaform]![cmb_atur5] and BONITET=1")) AS a1, IIf(IsNull(DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl5] and TURAD=[Formlar]![frm_Anaform]![cmb_atur5] and BONITET=2")),0,DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl5] and TURAD=[Formlar]![frm_Anaform]![cmb_atur5] and BONITET=2")) AS a2,IIf(IsNull(DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl5] and TURAD=[Formlar]![frm_Anaform]![cmb_atur5] and BONITET=3")),0,DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl5] and TURAD=[Formlar]![frm_Anaform]![cmb_atur5] and BONITET=3")) AS a3,IIf(IsNull(DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl5] and TURAD=[Formlar]![frm_Anaform]![cmb_atur5] and BONITET=4")),0,DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl5] and TURAD=[Formlar]![frm_Anaform]![cmb_atur5] and BONITET=4")) AS a4,IIf(IsNull(DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl5] and TURAD=[Formlar]![frm_Anaform]![cmb_atur5] and BONITET=5")),0,DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl5] and TURAD=[Formlar]![frm_Anaform]![cmb_atur5] and BONITET=5")) AS a5,
DLookUp("ALT","BON_ENDX","BONITET=1 and TUR_KOD=[Formlar]![frm_Anaform]![agk5]") & "-" & Dlookup ("UST","BON_ENDX","BONITET=1 and TUR_KOD=[Formlar]![frm_Anaform]![agk5]") AS b1,DLookUp("ALT","BON_ENDX","BONITET=2 and TUR_KOD=[Formlar]![frm_Anaform]![agk5]") & "-" & Dlookup ("UST","BON_ENDX","BONITET=2 and TUR_KOD=[Formlar]![frm_Anaform]![agk5]") AS b2,DLookUp("ALT","BON_ENDX","BONITET=3 and TUR_KOD=[Formlar]![frm_Anaform]![agk5]") & "-" & Dlookup ("UST","BON_ENDX","BONITET=3 and TUR_KOD=[Formlar]![frm_Anaform]![agk5]") AS b3,DLookUp("ALT","BON_ENDX","BONITET=4 and TUR_KOD=[Formlar]![frm_Anaform]![agk5]") & "-" & Dlookup ("UST","BON_ENDX","BONITET=4 and TUR_KOD=[Formlar]![frm_Anaform]![agk5]") AS b4,DLookUp("ALT","BON_ENDX","BONITET=5 and TUR_KOD=[Formlar]![frm_Anaform]![agk5]") & "-" & Dlookup ("UST","BON_ENDX","BONITET=5 and TUR_KOD=[Formlar]![frm_Anaform]![agk5]") AS b5,
IIf(IsNull(DLookUp("ORTA","BON_ENDX","BONITET=1 and TUR_KOD=[Formlar]![frm_Anaform]![agk5]")),0,DLookUp("ORTA","BON_ENDX","BONITET=1 and TUR_KOD=[Formlar]![frm_Anaform]![agk5]")) AS e1, IIf(IsNull(DLookUp("ORTA","BON_ENDX","BONITET=2 and TUR_KOD=[Formlar]![frm_Anaform]![agk5]")),0,DLookUp("ORTA","BON_ENDX","BONITET=2 and TUR_KOD=[Formlar]![frm_Anaform]![agk5]")) AS e2,IIf(IsNull(DLookUp("ORTA","BON_ENDX","BONITET=3 and TUR_KOD=[Formlar]![frm_Anaform]![agk5]")),0,DLookUp("ORTA","BON_ENDX","BONITET=3 and TUR_KOD=[Formlar]![frm_Anaform]![agk5]")) AS e3,IIf(IsNull(DLookUp("ORTA","BON_ENDX","BONITET=4 and TUR_KOD=[Formlar]![frm_Anaform]![agk5]")),0,DLookUp("ORTA","BON_ENDX","BONITET=4 and TUR_KOD=[Formlar]![frm_Anaform]![agk5]")) AS e4,IIf(IsNull(DLookUp("ORTA","BON_ENDX","BONITET=5 and TUR_KOD=[Formlar]![frm_Anaform]![agk5]")),0,DLookUp("ORTA","BON_ENDX","BONITET=5 and TUR_KOD=[Formlar]![frm_Anaform]![agk5]")) AS e5,DLookUp("Round([1],2)","REDUK","ISL_SIN=[Formlar]![frm_Anaform]![isl5]") AS rkat1,DLookUp("Round([2],2)","REDUK","ISL_SIN=[Formlar]![frm_Anaform]![isl5]") AS rkat2,DLookUp("Round([3],2)","REDUK","ISL_SIN=[Formlar]![frm_Anaform]![isl5]") AS rkat3,DLookUp("Round([4],2)","REDUK","ISL_SIN=[Formlar]![frm_Anaform]![isl5]") AS rkat4,DLookUp("Round([5],2)","REDUK","ISL_SIN=[Formlar]![frm_Anaform]![isl5]") AS rkat5,
IIf(IsNull(DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl5] and TURAD=[Formlar]![frm_Anaform]![cmb_atur5] and BONITET=1")),0,DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl5] and TURAD=[Formlar]![frm_Anaform]![cmb_atur5] and BONITET=1")) AS reduka1,
IIf(IsNull(DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl5] and TURAD=[Formlar]![frm_Anaform]![cmb_atur5] and BONITET=2")),0,DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl5] and TURAD=[Formlar]![frm_Anaform]![cmb_atur5] and BONITET=2")) AS reduka2,
IIf(IsNull(DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl5] and TURAD=[Formlar]![frm_Anaform]![cmb_atur5] and BONITET=3")),0,DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl5] and TURAD=[Formlar]![frm_Anaform]![cmb_atur5] and BONITET=3")) AS reduka3,
IIf(IsNull(DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl5] and TURAD=[Formlar]![frm_Anaform]![cmb_atur5] and BONITET=4")),0,DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl5] and TURAD=[Formlar]![frm_Anaform]![cmb_atur5] and BONITET=4")) AS reduka4,
IIf(IsNull(DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl5] and TURAD=[Formlar]![frm_Anaform]![cmb_atur5] and BONITET=5")),0,DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl5] and TURAD=[Formlar]![frm_Anaform]![cmb_atur5] and BONITET=5")) AS reduka5,
DLookUp("ALT","BON_ENDX","BONITET=[Formlar]![frm_Anaform]![boni5] and TUR_KOD=[Formlar]![frm_Anaform]![agk5]") & " - " & Dlookup ("UST","BON_ENDX","BONITET=[Formlar]![frm_Anaform]![boni5] and TUR_KOD=[Formlar]![frm_Anaform]![agk5]") AS bonar,
IIf(IsNull([Formlar]![frm_Anaform]![isl5]),"0","1") AS x, IIf(IsNull([Formlar]![frm_Anaform]![cmb_atur5]),"0","1") AS y
FROM SERVET
GROUP BY IIf(IsNull([Formlar]![frm_Anaform]![isl5]),"O" ,[Formlar]![frm_Anaform]![isl5] & "-" & [Formlar]![frm_Anaform]![agad5] & " " & "İşletme Sınıfında Ortalama Bonitet Tayini ve Redüktif Alan Hesabı:"), Dlookup ("Des_NomVal_Name_L1","Des_NomVal","Des_ID=48"), IIf(IsNull(DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl5] and TURAD=[Formlar]![frm_Anaform]![cmb_atur5] and BONITET=1")),0,DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl5] and TURAD=[Formlar]![frm_Anaform]![cmb_atur5] and BONITET=1")), Dlookup ("ALT","BON_ENDX","BONITET=1 and TUR_KOD=[Formlar]![frm_Anaform]![agk5]") & "-" & Dlookup ("UST","BON_ENDX","BONITET=1 and TUR_KOD=[Formlar]![frm_Anaform]![agk5]"), IIf(IsNull(DLookUp("ORTA","BON_ENDX","BONITET=1 and TUR_KOD=[Formlar]![frm_Anaform]![agk5]")),0,DLookUp("ORTA","BON_ENDX","BONITET=1 and TUR_KOD=[Formlar]![frm_Anaform]![agk5]")),DLookUp("Round([1],2)","REDUK","ISL_SIN=[Formlar]![frm_Anaform]![isl5]"),IIf(IsNull(DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl5] and TURAD=[Formlar]![frm_Anaform]![cmb_atur5] and BONITET=1")),0,DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl5] and TURAD=[Formlar]![frm_Anaform]![cmb_atur5] and BONITET=1")),DLookUp("ALT","BON_ENDX","BONITET=[Formlar]![frm_Anaform]![boni5] and TUR_KOD=[Formlar]![frm_Anaform]![agk5]") & " - " & Dlookup ("UST","BON_ENDX","BONITET=[Formlar]![frm_Anaform]![boni5] and TUR_KOD=[Formlar]![frm_Anaform]![agk5]")
HAVING (((IIf(IsNull([Formlar]![frm_Anaform]![isl5]),"0","1"))="1") AND ((IIf(IsNull([Formlar]![frm_Anaform]![cmb_atur5]),"0","1"))="1"));

isl1 veya atur1 dolu ise 1 yazar, sorguda her ikisi 1 olanları gösterir.
(20/04/2020, 14:44)ozanakkaya yazdı: [ -> ]Sorgu kodunu aşağıdaki ile değiştirerek dene,

SELECT
IIf(IsNull([Formlar]![frm_Anaform]![isl1]),"K" ,[Formlar]![frm_Anaform]![isl1] & "-" & [Formlar]![frm_Anaform]![agad1] & " " & "İşletme Sınıfında Ortalama Bonitet Tayini ve Redüktif Alan Hesabı:") AS Baslik,
DLookUp("Des_NomVal_Name_L1","Des_NomVal","Des_ID=48") AS sinif1,DLookUp("Des_NomVal_Name_L1","Des_NomVal","Des_ID=49") AS sinif2,DLookUp("Des_NomVal_Name_L1","Des_NomVal","Des_ID=50") AS sinif3,DLookUp("Des_NomVal_Name_L1","Des_NomVal","Des_ID=51") AS sinif4,DLookUp("Des_NomVal_Name_L1","Des_NomVal","Des_ID=52") AS sinif5,
IIf(IsNull(DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl1] and TURAD=[Formlar]![frm_Anaform]![cmb_atur1] and BONITET=1")),0,DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl1] and TURAD=[Formlar]![frm_Anaform]![cmb_atur1] and BONITET=1")) AS a1,IIf(IsNull(DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl1] and TURAD=[Formlar]![frm_Anaform]![cmb_atur1] and BONITET=2")),0,DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl1] and TURAD=[Formlar]![frm_Anaform]![cmb_atur1] and BONITET=2")) AS a2,IIf(IsNull(DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl1] and TURAD=[Formlar]![frm_Anaform]![cmb_atur1] and BONITET=3")),0,DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl1] and TURAD=[Formlar]![frm_Anaform]![cmb_atur1] and BONITET=3")) AS a3,IIf(IsNull(DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl1] and TURAD=[Formlar]![frm_Anaform]![cmb_atur1] and BONITET=4")),0,DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl1] and TURAD=[Formlar]![frm_Anaform]![cmb_atur1] and BONITET=4")) AS a4,IIf(IsNull(DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl1] and TURAD=[Formlar]![frm_Anaform]![cmb_atur1] and BONITET=5")),0,DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl1] and TURAD=[Formlar]![frm_Anaform]![cmb_atur1] and BONITET=5")) AS a5,
DLookUp("ALT","BON_ENDX","BONITET=1 and TUR_KOD=[Formlar]![frm_Anaform]![agk1]") & "-" & Dlookup ("UST","BON_ENDX","BONITET=1 and TUR_KOD=[Formlar]![frm_Anaform]![agk1]") AS b1, Dlookup ("ALT","BON_ENDX","BONITET=2 and TUR_KOD=[Formlar]![frm_Anaform]![agk1]") & "-" & Dlookup ("UST","BON_ENDX","BONITET=2 and TUR_KOD=[Formlar]![frm_Anaform]![agk1]") AS b2,DLookUp("ALT","BON_ENDX","BONITET=3 and TUR_KOD=[Formlar]![frm_Anaform]![agk1]") & "-" & Dlookup ("UST","BON_ENDX","BONITET=3 and TUR_KOD=[Formlar]![frm_Anaform]![agk1]") AS b3,DLookUp("ALT","BON_ENDX","BONITET=4 and TUR_KOD=[Formlar]![frm_Anaform]![agk1]") & "-" & Dlookup ("UST","BON_ENDX","BONITET=4 and TUR_KOD=[Formlar]![frm_Anaform]![agk1]") AS b4,DLookUp("ALT","BON_ENDX","BONITET=5 and TUR_KOD=[Formlar]![frm_Anaform]![agk1]") & "-" & Dlookup ("UST","BON_ENDX","BONITET=5 and TUR_KOD=[Formlar]![frm_Anaform]![agk1]") AS b5,
IIf(IsNull(DLookUp("ORTA","BON_ENDX","BONITET=1 and TUR_KOD=[Formlar]![frm_Anaform]![agk1]")),0,DLookUp("ORTA","BON_ENDX","BONITET=1 and TUR_KOD=[Formlar]![frm_Anaform]![agk1]")) AS e1,IIf(IsNull(DLookUp("ORTA","BON_ENDX","BONITET=2 and TUR_KOD=[Formlar]![frm_Anaform]![agk1]")),0,DLookUp("ORTA","BON_ENDX","BONITET=2 and TUR_KOD=[Formlar]![frm_Anaform]![agk1]")) AS e2,IIf(IsNull(DLookUp("ORTA","BON_ENDX","BONITET=3 and TUR_KOD=[Formlar]![frm_Anaform]![agk1]")),0,DLookUp("ORTA","BON_ENDX","BONITET=3 and TUR_KOD=[Formlar]![frm_Anaform]![agk1]")) AS e3,IIf(IsNull(DLookUp("ORTA","BON_ENDX","BONITET=4 and TUR_KOD=[Formlar]![frm_Anaform]![agk1]")),0,DLookUp("ORTA","BON_ENDX","BONITET=4 and TUR_KOD=[Formlar]![frm_Anaform]![agk1]")) AS e4,IIf(IsNull(DLookUp("ORTA","BON_ENDX","BONITET=5 and TUR_KOD=[Formlar]![frm_Anaform]![agk1]")),0,DLookUp("ORTA","BON_ENDX","BONITET=5 and TUR_KOD=[Formlar]![frm_Anaform]![agk1]")) AS e5,DLookUp("Round([1],2)","REDUK","ISL_SIN=[Formlar]![frm_Anaform]![isl1]") AS rkat1,DLookUp("Round([2],2)","REDUK","ISL_SIN=[Formlar]![frm_Anaform]![isl1]") AS rkat2,DLookUp("Round([3],2)","REDUK","ISL_SIN=[Formlar]![frm_Anaform]![isl1]") AS rkat3,DLookUp("Round([4],2)","REDUK","ISL_SIN=[Formlar]![frm_Anaform]![isl1]") AS rkat4,DLookUp("Round([5],2)","REDUK","ISL_SIN=[Formlar]![frm_Anaform]![isl1]") AS rkat5,
IIf(IsNull(DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl1] and TURAD=[Formlar]![frm_Anaform]![cmb_atur1] and BONITET=1")),0,DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl1] and TURAD=[Formlar]![frm_Anaform]![cmb_atur1] and BONITET=1")) AS reduka1,
IIf(IsNull(DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl1] and TURAD=[Formlar]![frm_Anaform]![cmb_atur1] and BONITET=2")),0,DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl1] and TURAD=[Formlar]![frm_Anaform]![cmb_atur1] and BONITET=2")) AS reduka2,
IIf(IsNull(DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl1] and TURAD=[Formlar]![frm_Anaform]![cmb_atur1] and BONITET=3")),0,DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl1] and TURAD=[Formlar]![frm_Anaform]![cmb_atur1] and BONITET=3")) AS reduka3,
IIf(IsNull(DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl1] and TURAD=[Formlar]![frm_Anaform]![cmb_atur1] and BONITET=4")),0,DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl1] and TURAD=[Formlar]![frm_Anaform]![cmb_atur1] and BONITET=4")) AS reduka4,
IIf(IsNull(DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl1] and TURAD=[Formlar]![frm_Anaform]![cmb_atur1] and BONITET=5")),0,DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl1] and TURAD=[Formlar]![frm_Anaform]![cmb_atur1] and BONITET=5")) AS reduka5,
DLookUp("ALT","BON_ENDX","BONITET=[Formlar]![frm_Anaform]![boni1] and TUR_KOD=[Formlar]![frm_Anaform]![agk1]") & " - " & Dlookup ("UST","BON_ENDX","BONITET=[Formlar]![frm_Anaform]![boni1] and TUR_KOD=[Formlar]![frm_Anaform]![agk1]") AS bonar,
IIf(IsNull([Formlar]![frm_Anaform]![isl1]),"0","1") AS x, IIf(IsNull([Formlar]![frm_Anaform]![cmb_atur1]),"0","1") AS y
FROM SERVET
GROUP BY IIf(IsNull([Formlar]![frm_Anaform]![isl1]),"K" ,[Formlar]![frm_Anaform]![isl1] & "-" & [Formlar]![frm_Anaform]![agad1] & " " & "İşletme Sınıfında Ortalama Bonitet Tayini ve Redüktif Alan Hesabı:"), Dlookup ("Des_NomVal_Name_L1","Des_NomVal","Des_ID=48"), IIf(IsNull(DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl1] and TURAD=[Formlar]![frm_Anaform]![cmb_atur1] and BONITET=1")),0,DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl1] and TURAD=[Formlar]![frm_Anaform]![cmb_atur1] and BONITET=1")), Dlookup ("ALT","BON_ENDX","BONITET=1 and TUR_KOD=[Formlar]![frm_Anaform]![agk1]") & "-" & Dlookup ("UST","BON_ENDX","BONITET=1 and TUR_KOD=[Formlar]![frm_Anaform]![agk1]"), IIf(IsNull(DLookUp("ORTA","BON_ENDX","BONITET=1 and TUR_KOD=[Formlar]![frm_Anaform]![agk1]")),0,DLookUp("ORTA","BON_ENDX","BONITET=1 and TUR_KOD=[Formlar]![frm_Anaform]![agk1]")),DLookUp("Round([1],2)","REDUK","ISL_SIN=[Formlar]![frm_Anaform]![isl1]"),
IIf(IsNull(DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl1] and TURAD=[Formlar]![frm_Anaform]![cmb_atur1] and BONITET=1")),0,DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl1] and TURAD=[Formlar]![frm_Anaform]![cmb_atur1] and BONITET=1")),DLookUp("ALT","BON_ENDX","BONITET=[Formlar]![frm_Anaform]![boni1] and TUR_KOD=[Formlar]![frm_Anaform]![agk1]") & " - " & Dlookup ("UST","BON_ENDX","BONITET=[Formlar]![frm_Anaform]![boni1] and TUR_KOD=[Formlar]![frm_Anaform]![agk1]")
HAVING (((IIf(IsNull([Formlar]![frm_Anaform]![isl1]),"0","1"))="1") AND ((IIf(IsNull([Formlar]![frm_Anaform]![cmb_atur1]),"0","1"))="1"));

UNION

SELECT
IIf(IsNull([Formlar]![frm_Anaform]![isl2]),"L" ,[Formlar]![frm_Anaform]![isl2] & "-" & [Formlar]![frm_Anaform]![agad2] & " " & "İşletme Sınıfında Ortalama Bonitet Tayini ve Redüktif Alan Hesabı:") AS Baslik,DLookUp("Des_NomVal_Name_L1","Des_NomVal","Des_ID=48") AS sinif1,DLookUp("Des_NomVal_Name_L1","Des_NomVal","Des_ID=49") AS sinif2,DLookUp("Des_NomVal_Name_L1","Des_NomVal","Des_ID=50") AS sinif3,DLookUp("Des_NomVal_Name_L1","Des_NomVal","Des_ID=51") AS sinif4,DLookUp("Des_NomVal_Name_L1","Des_NomVal","Des_ID=52") AS sinif5, IIf(IsNull(DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl2] and TURAD=[Formlar]![frm_Anaform]![cmb_atur2] and BONITET=1")),0,DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl2] and TURAD=[Formlar]![frm_Anaform]![cmb_atur2] and BONITET=1")) AS a1, IIf(IsNull(DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl2] and TURAD=[Formlar]![frm_Anaform]![cmb_atur2] and BONITET=2")),0,DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl2] and TURAD=[Formlar]![frm_Anaform]![cmb_atur2] and BONITET=2")) AS a2,IIf(IsNull(DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl2] and TURAD=[Formlar]![frm_Anaform]![cmb_atur2] and BONITET=3")),0,DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl2] and TURAD=[Formlar]![frm_Anaform]![cmb_atur2] and BONITET=3")) AS a3,IIf(IsNull(DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl2] and TURAD=[Formlar]![frm_Anaform]![cmb_atur2] and BONITET=4")),0,DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl2] and TURAD=[Formlar]![frm_Anaform]![cmb_atur2] and BONITET=4")) AS a4,IIf(IsNull(DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl2] and TURAD=[Formlar]![frm_Anaform]![cmb_atur2] and BONITET=5")),0,DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl2] and TURAD=[Formlar]![frm_Anaform]![cmb_atur2] and BONITET=5")) AS a5,
DLookUp("ALT","BON_ENDX","BONITET=1 and TUR_KOD=[Formlar]![frm_Anaform]![agk2]") & "-" & Dlookup ("UST","BON_ENDX","BONITET=1 and TUR_KOD=[Formlar]![frm_Anaform]![agk2]") AS b1,DLookUp("ALT","BON_ENDX","BONITET=2 and TUR_KOD=[Formlar]![frm_Anaform]![agk2]") & "-" & Dlookup ("UST","BON_ENDX","BONITET=2 and TUR_KOD=[Formlar]![frm_Anaform]![agk2]") AS b2,DLookUp("ALT","BON_ENDX","BONITET=3 and TUR_KOD=[Formlar]![frm_Anaform]![agk2]") & "-" & Dlookup ("UST","BON_ENDX","BONITET=3 and TUR_KOD=[Formlar]![frm_Anaform]![agk2]") AS b3,DLookUp("ALT","BON_ENDX","BONITET=4 and TUR_KOD=[Formlar]![frm_Anaform]![agk2]") & "-" & Dlookup ("UST","BON_ENDX","BONITET=4 and TUR_KOD=[Formlar]![frm_Anaform]![agk2]") AS b4,DLookUp("ALT","BON_ENDX","BONITET=5 and TUR_KOD=[Formlar]![frm_Anaform]![agk2]") & "-" & Dlookup ("UST","BON_ENDX","BONITET=5 and TUR_KOD=[Formlar]![frm_Anaform]![agk2]") AS b5,
IIf(IsNull(DLookUp("ORTA","BON_ENDX","BONITET=1 and TUR_KOD=[Formlar]![frm_Anaform]![agk2]")),0,DLookUp("ORTA","BON_ENDX","BONITET=1 and TUR_KOD=[Formlar]![frm_Anaform]![agk2]")) AS e1, IIf(IsNull(DLookUp("ORTA","BON_ENDX","BONITET=2 and TUR_KOD=[Formlar]![frm_Anaform]![agk2]")),0,DLookUp("ORTA","BON_ENDX","BONITET=2 and TUR_KOD=[Formlar]![frm_Anaform]![agk2]")) AS e2,IIf(IsNull(DLookUp("ORTA","BON_ENDX","BONITET=3 and TUR_KOD=[Formlar]![frm_Anaform]![agk2]")),0,DLookUp("ORTA","BON_ENDX","BONITET=3 and TUR_KOD=[Formlar]![frm_Anaform]![agk2]")) AS e3,IIf(IsNull(DLookUp("ORTA","BON_ENDX","BONITET=4 and TUR_KOD=[Formlar]![frm_Anaform]![agk2]")),0,DLookUp("ORTA","BON_ENDX","BONITET=4 and TUR_KOD=[Formlar]![frm_Anaform]![agk2]")) AS e4,IIf(IsNull(DLookUp("ORTA","BON_ENDX","BONITET=5 and TUR_KOD=[Formlar]![frm_Anaform]![agk2]")),0,DLookUp("ORTA","BON_ENDX","BONITET=5 and TUR_KOD=[Formlar]![frm_Anaform]![agk2]")) AS e5,DLookUp("Round([1],2)","REDUK","ISL_SIN=[Formlar]![frm_Anaform]![isl2]") AS rkat1,DLookUp("Round([2],2)","REDUK","ISL_SIN=[Formlar]![frm_Anaform]![isl2]") AS rkat2,DLookUp("Round([3],2)","REDUK","ISL_SIN=[Formlar]![frm_Anaform]![isl2]") AS rkat3,DLookUp("Round([4],2)","REDUK","ISL_SIN=[Formlar]![frm_Anaform]![isl2]") AS rkat4,DLookUp("Round([5],2)","REDUK","ISL_SIN=[Formlar]![frm_Anaform]![isl2]") AS rkat5,
IIf(IsNull(DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl2] and TURAD=[Formlar]![frm_Anaform]![cmb_atur2] and BONITET=1")),0,DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl2] and TURAD=[Formlar]![frm_Anaform]![cmb_atur2] and BONITET=1")) AS reduka1,
IIf(IsNull(DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl2] and TURAD=[Formlar]![frm_Anaform]![cmb_atur2] and BONITET=2")),0,DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl2] and TURAD=[Formlar]![frm_Anaform]![cmb_atur2] and BONITET=2")) AS reduka2,
IIf(IsNull(DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl2] and TURAD=[Formlar]![frm_Anaform]![cmb_atur2] and BONITET=3")),0,DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl2] and TURAD=[Formlar]![frm_Anaform]![cmb_atur2] and BONITET=3")) AS reduka3,
IIf(IsNull(DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl2] and TURAD=[Formlar]![frm_Anaform]![cmb_atur2] and BONITET=4")),0,DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl2] and TURAD=[Formlar]![frm_Anaform]![cmb_atur2] and BONITET=4")) AS reduka4,
IIf(IsNull(DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl2] and TURAD=[Formlar]![frm_Anaform]![cmb_atur2] and BONITET=5")),0,DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl2] and TURAD=[Formlar]![frm_Anaform]![cmb_atur2] and BONITET=5")) AS reduka5,
DLookUp("ALT","BON_ENDX","BONITET=[Formlar]![frm_Anaform]![boni2] and TUR_KOD=[Formlar]![frm_Anaform]![agk2]") & " - " & Dlookup ("UST","BON_ENDX","BONITET=[Formlar]![frm_Anaform]![boni2] and TUR_KOD=[Formlar]![frm_Anaform]![agk2]") AS bonar,
IIf(IsNull([Formlar]![frm_Anaform]![isl2]),"0","1") AS x, IIf(IsNull([Formlar]![frm_Anaform]![cmb_atur2]),"0","1") AS y

FROM SERVET
GROUP BY IIf(IsNull([Formlar]![frm_Anaform]![isl2]),"L" ,[Formlar]![frm_Anaform]![isl2] & "-" & [Formlar]![frm_Anaform]![agad2] & " " & "İşletme Sınıfında Ortalama Bonitet Tayini ve Redüktif Alan Hesabı:"),DLookUp("Des_NomVal_Name_L1","Des_NomVal","Des_ID=48"), IIf(IsNull(DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl2] and TURAD=[Formlar]![frm_Anaform]![cmb_atur2] and BONITET=1")),0,DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl2] and TURAD=[Formlar]![frm_Anaform]![cmb_atur2] and BONITET=1")), Dlookup ("ALT","BON_ENDX","BONITET=1 and TUR_KOD=[Formlar]![frm_Anaform]![agk2]") & "-" & Dlookup ("UST","BON_ENDX","BONITET=1 and TUR_KOD=[Formlar]![frm_Anaform]![agk2]"), IIf(IsNull(DLookUp("ORTA","BON_ENDX","BONITET=1 and TUR_KOD=[Formlar]![frm_Anaform]![agk2]")),0,DLookUp("ORTA","BON_ENDX","BONITET=1 and TUR_KOD=[Formlar]![frm_Anaform]![agk2]")),DLookUp("Round([1],2)","REDUK","ISL_SIN=[Formlar]![frm_Anaform]![isl2]"),
IIf(IsNull(DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl2] and TURAD=[Formlar]![frm_Anaform]![cmb_atur2] and BONITET=1")),0,DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl2] and TURAD=[Formlar]![frm_Anaform]![cmb_atur2] and BONITET=1")),DLookUp("ALT","BON_ENDX","BONITET=[Formlar]![frm_Anaform]![boni2] and TUR_KOD=[Formlar]![frm_Anaform]![agk2]") & " - " & Dlookup ("UST","BON_ENDX","BONITET=[Formlar]![frm_Anaform]![boni2] and TUR_KOD=[Formlar]![frm_Anaform]![agk2]")
HAVING (((IIf(IsNull([Formlar]![frm_Anaform]![isl2]),"0","1"))="1") AND ((IIf(IsNull([Formlar]![frm_Anaform]![cmb_atur2]),"0","1"))="1"));

UNION

SELECT
IIf(IsNull([Formlar]![frm_Anaform]![isl3]),"M" ,[Formlar]![frm_Anaform]![isl3] & "-" & [Formlar]![frm_Anaform]![agad3] & " " & "İşletme Sınıfında Ortalama Bonitet Tayini ve Redüktif Alan Hesabı:") AS Baslik,
DLookUp("Des_NomVal_Name_L1","Des_NomVal","Des_ID=48") AS sinif1,DLookUp("Des_NomVal_Name_L1","Des_NomVal","Des_ID=49") AS sinif2,DLookUp("Des_NomVal_Name_L1","Des_NomVal","Des_ID=50") AS sinif3,DLookUp("Des_NomVal_Name_L1","Des_NomVal","Des_ID=51") AS sinif4,DLookUp("Des_NomVal_Name_L1","Des_NomVal","Des_ID=52") AS sinif5, IIf(IsNull(DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl3] and TURAD=[Formlar]![frm_Anaform]![cmb_atur3] and BONITET=1")),0,DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl3] and TURAD=[Formlar]![frm_Anaform]![cmb_atur3] and BONITET=1")) AS a1, IIf(IsNull(DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl3] and TURAD=[Formlar]![frm_Anaform]![cmb_atur3] and BONITET=2")),0,DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl3] and TURAD=[Formlar]![frm_Anaform]![cmb_atur3] and BONITET=2")) AS a2,IIf(IsNull(DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl3] and TURAD=[Formlar]![frm_Anaform]![cmb_atur3] and BONITET=3")),0,DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl3] and TURAD=[Formlar]![frm_Anaform]![cmb_atur3] and BONITET=3")) AS a3,IIf(IsNull(DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl3] and TURAD=[Formlar]![frm_Anaform]![cmb_atur3] and BONITET=4")),0,DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl3] and TURAD=[Formlar]![frm_Anaform]![cmb_atur3] and BONITET=4")) AS a4,IIf(IsNull(DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl3] and TURAD=[Formlar]![frm_Anaform]![cmb_atur3] and BONITET=5")),0,DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl3] and TURAD=[Formlar]![frm_Anaform]![cmb_atur3] and BONITET=5")) AS a5,
DLookUp("ALT","BON_ENDX","BONITET=1 and TUR_KOD=[Formlar]![frm_Anaform]![agk3]") & "-" & Dlookup ("UST","BON_ENDX","BONITET=1 and TUR_KOD=[Formlar]![frm_Anaform]![agk3]") AS b1,DLookUp("ALT","BON_ENDX","BONITET=2 and TUR_KOD=[Formlar]![frm_Anaform]![agk3]") & "-" & Dlookup ("UST","BON_ENDX","BONITET=2 and TUR_KOD=[Formlar]![frm_Anaform]![agk3]") AS b2,DLookUp("ALT","BON_ENDX","BONITET=3 and TUR_KOD=[Formlar]![frm_Anaform]![agk3]") & "-" & Dlookup ("UST","BON_ENDX","BONITET=3 and TUR_KOD=[Formlar]![frm_Anaform]![agk3]") AS b3,DLookUp("ALT","BON_ENDX","BONITET=4 and TUR_KOD=[Formlar]![frm_Anaform]![agk3]") & "-" & Dlookup ("UST","BON_ENDX","BONITET=4 and TUR_KOD=[Formlar]![frm_Anaform]![agk3]") AS b4,DLookUp("ALT","BON_ENDX","BONITET=5 and TUR_KOD=[Formlar]![frm_Anaform]![agk3]") & "-" & Dlookup ("UST","BON_ENDX","BONITET=5 and TUR_KOD=[Formlar]![frm_Anaform]![agk3]") AS b5,
IIf(IsNull(DLookUp("ORTA","BON_ENDX","BONITET=1 and TUR_KOD=[Formlar]![frm_Anaform]![agk3]")),0,DLookUp("ORTA","BON_ENDX","BONITET=1 and TUR_KOD=[Formlar]![frm_Anaform]![agk3]")) AS e1, IIf(IsNull(DLookUp("ORTA","BON_ENDX","BONITET=2 and TUR_KOD=[Formlar]![frm_Anaform]![agk3]")),0,DLookUp("ORTA","BON_ENDX","BONITET=2 and TUR_KOD=[Formlar]![frm_Anaform]![agk3]")) AS e2,IIf(IsNull(DLookUp("ORTA","BON_ENDX","BONITET=3 and TUR_KOD=[Formlar]![frm_Anaform]![agk3]")),0,DLookUp("ORTA","BON_ENDX","BONITET=3 and TUR_KOD=[Formlar]![frm_Anaform]![agk3]")) AS e3,IIf(IsNull(DLookUp("ORTA","BON_ENDX","BONITET=4 and TUR_KOD=[Formlar]![frm_Anaform]![agk3]")),0,DLookUp("ORTA","BON_ENDX","BONITET=4 and TUR_KOD=[Formlar]![frm_Anaform]![agk3]")) AS e4,IIf(IsNull(DLookUp("ORTA","BON_ENDX","BONITET=5 and TUR_KOD=[Formlar]![frm_Anaform]![agk3]")),0,DLookUp("ORTA","BON_ENDX","BONITET=5 and TUR_KOD=[Formlar]![frm_Anaform]![agk3]")) AS e5,DLookUp("Round([1],2)","REDUK","ISL_SIN=[Formlar]![frm_Anaform]![isl3]") AS rkat1,DLookUp("Round([2],2)","REDUK","ISL_SIN=[Formlar]![frm_Anaform]![isl3]") AS rkat2,DLookUp("Round([3],2)","REDUK","ISL_SIN=[Formlar]![frm_Anaform]![isl3]") AS rkat3,DLookUp("Round([4],2)","REDUK","ISL_SIN=[Formlar]![frm_Anaform]![isl3]") AS rkat4,DLookUp("Round([5],2)","REDUK","ISL_SIN=[Formlar]![frm_Anaform]![isl3]") AS rkat5,
IIf(IsNull(DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl3] and TURAD=[Formlar]![frm_Anaform]![cmb_atur3] and BONITET=1")),0,DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl3] and TURAD=[Formlar]![frm_Anaform]![cmb_atur3] and BONITET=1")) AS reduka1,
IIf(IsNull(DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl3] and TURAD=[Formlar]![frm_Anaform]![cmb_atur3] and BONITET=2")),0,DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl3] and TURAD=[Formlar]![frm_Anaform]![cmb_atur3] and BONITET=2")) AS reduka2,
IIf(IsNull(DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl3] and TURAD=[Formlar]![frm_Anaform]![cmb_atur3] and BONITET=3")),0,DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl3] and TURAD=[Formlar]![frm_Anaform]![cmb_atur3] and BONITET=3")) AS reduka3,
IIf(IsNull(DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl3] and TURAD=[Formlar]![frm_Anaform]![cmb_atur3] and BONITET=4")),0,DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl3] and TURAD=[Formlar]![frm_Anaform]![cmb_atur3] and BONITET=4")) AS reduka4,
IIf(IsNull(DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl3] and TURAD=[Formlar]![frm_Anaform]![cmb_atur3] and BONITET=5")),0,DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl3] and TURAD=[Formlar]![frm_Anaform]![cmb_atur3] and BONITET=5")) AS reduka5,
DLookUp("ALT","BON_ENDX","BONITET=[Formlar]![frm_Anaform]![boni3] and TUR_KOD=[Formlar]![frm_Anaform]![agk3]") & " - " & Dlookup ("UST","BON_ENDX","BONITET=[Formlar]![frm_Anaform]![boni3] and TUR_KOD=[Formlar]![frm_Anaform]![agk3]") AS bonar,
IIf(IsNull([Formlar]![frm_Anaform]![isl3]),"0","1") AS x, IIf(IsNull([Formlar]![frm_Anaform]![cmb_atur3]),"0","1") AS y
FROM SERVET
GROUP BY IIf(IsNull([Formlar]![frm_Anaform]![isl3]),"M" ,[Formlar]![frm_Anaform]![isl3] & "-" & [Formlar]![frm_Anaform]![agad3] & " " & "İşletme Sınıfında Ortalama Bonitet Tayini ve Redüktif Alan Hesabı:"),DLookUp("Des_NomVal_Name_L1","Des_NomVal","Des_ID=48"), IIf(IsNull(DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl3] and TURAD=[Formlar]![frm_Anaform]![cmb_atur3] and BONITET=1")),0,DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl3] and TURAD=[Formlar]![frm_Anaform]![cmb_atur3] and BONITET=1")), Dlookup ("ALT","BON_ENDX","BONITET=1 and TUR_KOD=[Formlar]![frm_Anaform]![agk3]") & "-" & Dlookup ("UST","BON_ENDX","BONITET=1 and TUR_KOD=[Formlar]![frm_Anaform]![agk3]"), IIf(IsNull(DLookUp("ORTA","BON_ENDX","BONITET=1 and TUR_KOD=[Formlar]![frm_Anaform]![agk3]")),0,DLookUp("ORTA","BON_ENDX","BONITET=1 and TUR_KOD=[Formlar]![frm_Anaform]![agk3]")),DLookUp("Round([1],2)","REDUK","ISL_SIN=[Formlar]![frm_Anaform]![isl3]"),IIf(IsNull(DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl3] and TURAD=[Formlar]![frm_Anaform]![cmb_atur3] and BONITET=1")),0,DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl3] and TURAD=[Formlar]![frm_Anaform]![cmb_atur3] and BONITET=1")),DLookUp("ALT","BON_ENDX","BONITET=[Formlar]![frm_Anaform]![boni3] and TUR_KOD=[Formlar]![frm_Anaform]![agk3]") & " - " & Dlookup ("UST","BON_ENDX","BONITET=[Formlar]![frm_Anaform]![boni3] and TUR_KOD=[Formlar]![frm_Anaform]![agk3]")
HAVING (((IIf(IsNull([Formlar]![frm_Anaform]![isl3]),"0","1"))="1") AND ((IIf(IsNull([Formlar]![frm_Anaform]![cmb_atur3]),"0","1"))="1"));

UNION

SELECT
IIf(IsNull([Formlar]![frm_Anaform]![isl4]),"N" ,[Formlar]![frm_Anaform]![isl4] & "-" & [Formlar]![frm_Anaform]![agad4] & " " & "İşletme Sınıfında Ortalama Bonitet Tayini ve Redüktif Alan Hesabı:") AS Baslik,
DLookUp("Des_NomVal_Name_L1","Des_NomVal","Des_ID=48") AS sinif1,DLookUp("Des_NomVal_Name_L1","Des_NomVal","Des_ID=49") AS sinif2,DLookUp("Des_NomVal_Name_L1","Des_NomVal","Des_ID=50") AS sinif3,DLookUp("Des_NomVal_Name_L1","Des_NomVal","Des_ID=51") AS sinif4,DLookUp("Des_NomVal_Name_L1","Des_NomVal","Des_ID=52") AS sinif5, IIf(IsNull(DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl4] and TURAD=[Formlar]![frm_Anaform]![cmb_atur4] and BONITET=1")),0,DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl4] and TURAD=[Formlar]![frm_Anaform]![cmb_atur4] and BONITET=1")) AS a1, IIf(IsNull(DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl4] and TURAD=[Formlar]![frm_Anaform]![cmb_atur4] and BONITET=2")),0,DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl4] and TURAD=[Formlar]![frm_Anaform]![cmb_atur4] and BONITET=2")) AS a2,IIf(IsNull(DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl4] and TURAD=[Formlar]![frm_Anaform]![cmb_atur4] and BONITET=3")),0,DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl4] and TURAD=[Formlar]![frm_Anaform]![cmb_atur4] and BONITET=3")) AS a3,IIf(IsNull(DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl4] and TURAD=[Formlar]![frm_Anaform]![cmb_atur4] and BONITET=4")),0,DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl4] and TURAD=[Formlar]![frm_Anaform]![cmb_atur4] and BONITET=4")) AS a4,IIf(IsNull(DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl4] and TURAD=[Formlar]![frm_Anaform]![cmb_atur4] and BONITET=5")),0,DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl4] and TURAD=[Formlar]![frm_Anaform]![cmb_atur4] and BONITET=5")) AS a5,
DLookUp("ALT","BON_ENDX","BONITET=1 and TUR_KOD=[Formlar]![frm_Anaform]![agk4]") & "-" & Dlookup ("UST","BON_ENDX","BONITET=1 and TUR_KOD=[Formlar]![frm_Anaform]![agk4]") AS b1,DLookUp("ALT","BON_ENDX","BONITET=2 and TUR_KOD=[Formlar]![frm_Anaform]![agk4]") & "-" & Dlookup ("UST","BON_ENDX","BONITET=2 and TUR_KOD=[Formlar]![frm_Anaform]![agk4]") AS b2,DLookUp("ALT","BON_ENDX","BONITET=3 and TUR_KOD=[Formlar]![frm_Anaform]![agk4]") & "-" & Dlookup ("UST","BON_ENDX","BONITET=3 and TUR_KOD=[Formlar]![frm_Anaform]![agk4]") AS b3,DLookUp("ALT","BON_ENDX","BONITET=4 and TUR_KOD=[Formlar]![frm_Anaform]![agk4]") & "-" & Dlookup ("UST","BON_ENDX","BONITET=4 and TUR_KOD=[Formlar]![frm_Anaform]![agk4]") AS b4,DLookUp("ALT","BON_ENDX","BONITET=5 and TUR_KOD=[Formlar]![frm_Anaform]![agk4]") & "-" & Dlookup ("UST","BON_ENDX","BONITET=5 and TUR_KOD=[Formlar]![frm_Anaform]![agk4]") AS b5,
IIf(IsNull(DLookUp("ORTA","BON_ENDX","BONITET=1 and TUR_KOD=[Formlar]![frm_Anaform]![agk4]")),0,DLookUp("ORTA","BON_ENDX","BONITET=1 and TUR_KOD=[Formlar]![frm_Anaform]![agk4]")) AS e1, IIf(IsNull(DLookUp("ORTA","BON_ENDX","BONITET=2 and TUR_KOD=[Formlar]![frm_Anaform]![agk4]")),0,DLookUp("ORTA","BON_ENDX","BONITET=2 and TUR_KOD=[Formlar]![frm_Anaform]![agk4]")) AS e2,IIf(IsNull(DLookUp("ORTA","BON_ENDX","BONITET=3 and TUR_KOD=[Formlar]![frm_Anaform]![agk4]")),0,DLookUp("ORTA","BON_ENDX","BONITET=3 and TUR_KOD=[Formlar]![frm_Anaform]![agk4]")) AS e3,IIf(IsNull(DLookUp("ORTA","BON_ENDX","BONITET=4 and TUR_KOD=[Formlar]![frm_Anaform]![agk4]")),0,DLookUp("ORTA","BON_ENDX","BONITET=4 and TUR_KOD=[Formlar]![frm_Anaform]![agk4]")) AS e4,IIf(IsNull(DLookUp("ORTA","BON_ENDX","BONITET=5 and TUR_KOD=[Formlar]![frm_Anaform]![agk4]")),0,DLookUp("ORTA","BON_ENDX","BONITET=5 and TUR_KOD=[Formlar]![frm_Anaform]![agk4]")) AS e5,DLookUp("Round([1],2)","REDUK","ISL_SIN=[Formlar]![frm_Anaform]![isl4]") AS rkat1,DLookUp("Round([2],2)","REDUK","ISL_SIN=[Formlar]![frm_Anaform]![isl4]") AS rkat2,DLookUp("Round([3],2)","REDUK","ISL_SIN=[Formlar]![frm_Anaform]![isl4]") AS rkat3,DLookUp("Round([4],2)","REDUK","ISL_SIN=[Formlar]![frm_Anaform]![isl4]") AS rkat4,DLookUp("Round([5],2)","REDUK","ISL_SIN=[Formlar]![frm_Anaform]![isl4]") AS rkat5,
IIf(IsNull(DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl4] and TURAD=[Formlar]![frm_Anaform]![cmb_atur4] and BONITET=1")),0,DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl4] and TURAD=[Formlar]![frm_Anaform]![cmb_atur4] and BONITET=1")) AS reduka1,
IIf(IsNull(DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl4] and TURAD=[Formlar]![frm_Anaform]![cmb_atur4] and BONITET=2")),0,DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl4] and TURAD=[Formlar]![frm_Anaform]![cmb_atur4] and BONITET=2")) AS reduka2,
IIf(IsNull(DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl4] and TURAD=[Formlar]![frm_Anaform]![cmb_atur4] and BONITET=3")),0,DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl4] and TURAD=[Formlar]![frm_Anaform]![cmb_atur4] and BONITET=3")) AS reduka3,
IIf(IsNull(DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl4] and TURAD=[Formlar]![frm_Anaform]![cmb_atur4] and BONITET=4")),0,DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl4] and TURAD=[Formlar]![frm_Anaform]![cmb_atur4] and BONITET=4")) AS reduka4,
IIf(IsNull(DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl4] and TURAD=[Formlar]![frm_Anaform]![cmb_atur4] and BONITET=5")),0,DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl4] and TURAD=[Formlar]![frm_Anaform]![cmb_atur4] and BONITET=5")) AS reduka5,
DLookUp("ALT","BON_ENDX","BONITET=[Formlar]![frm_Anaform]![boni4] and TUR_KOD=[Formlar]![frm_Anaform]![agk4]") & " - " & Dlookup ("UST","BON_ENDX","BONITET=[Formlar]![frm_Anaform]![boni4] and TUR_KOD=[Formlar]![frm_Anaform]![agk4]") AS bonar,
IIf(IsNull([Formlar]![frm_Anaform]![isl4]),"0","1") AS x, IIf(IsNull([Formlar]![frm_Anaform]![cmb_atur4]),"0","1") AS y
FROM SERVET
GROUP BY IIf(IsNull([Formlar]![frm_Anaform]![isl4]),"N" ,[Formlar]![frm_Anaform]![isl4] & "-" & [Formlar]![frm_Anaform]![agad4] & " " & "İşletme Sınıfında Ortalama Bonitet Tayini ve Redüktif Alan Hesabı:"), Dlookup ("Des_NomVal_Name_L1","Des_NomVal","Des_ID=48"), IIf(IsNull(DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl4] and TURAD=[Formlar]![frm_Anaform]![cmb_atur4] and BONITET=1")),0,DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl4] and TURAD=[Formlar]![frm_Anaform]![cmb_atur4] and BONITET=1")), Dlookup ("ALT","BON_ENDX","BONITET=1 and TUR_KOD=[Formlar]![frm_Anaform]![agk4]") & "-" & Dlookup ("UST","BON_ENDX","BONITET=1 and TUR_KOD=[Formlar]![frm_Anaform]![agk4]"), IIf(IsNull(DLookUp("ORTA","BON_ENDX","BONITET=1 and TUR_KOD=[Formlar]![frm_Anaform]![agk4]")),0,DLookUp("ORTA","BON_ENDX","BONITET=1 and TUR_KOD=[Formlar]![frm_Anaform]![agk4]")),DLookUp("Round([1],2)","REDUK","ISL_SIN=[Formlar]![frm_Anaform]![isl4]"),IIf(IsNull(DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl4] and TURAD=[Formlar]![frm_Anaform]![cmb_atur4] and BONITET=1")),0,DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl4] and TURAD=[Formlar]![frm_Anaform]![cmb_atur4] and BONITET=1")),DLookUp("ALT","BON_ENDX","BONITET=[Formlar]![frm_Anaform]![boni4] and TUR_KOD=[Formlar]![frm_Anaform]![agk4]") & " - " & Dlookup ("UST","BON_ENDX","BONITET=[Formlar]![frm_Anaform]![boni4] and TUR_KOD=[Formlar]![frm_Anaform]![agk4]")
HAVING (((IIf(IsNull([Formlar]![frm_Anaform]![isl4]),"0","1"))="1") AND ((IIf(IsNull([Formlar]![frm_Anaform]![cmb_atur4]),"0","1"))="1"));

UNION SELECT

IIf(IsNull([Formlar]![frm_Anaform]![isl5]),"O" ,[Formlar]![frm_Anaform]![isl5] & "-" & [Formlar]![frm_Anaform]![agad5] & " " & "İşletme Sınıfında Ortalama Bonitet Tayini ve Redüktif Alan Hesabı:") AS Baslik,
DLookUp("Des_NomVal_Name_L1","Des_NomVal","Des_ID=48") AS sinif1,DLookUp("Des_NomVal_Name_L1","Des_NomVal","Des_ID=49") AS sinif2,DLookUp("Des_NomVal_Name_L1","Des_NomVal","Des_ID=50") AS sinif3,DLookUp("Des_NomVal_Name_L1","Des_NomVal","Des_ID=51") AS sinif4,DLookUp("Des_NomVal_Name_L1","Des_NomVal","Des_ID=52") AS sinif5, IIf(IsNull(DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl5] and TURAD=[Formlar]![frm_Anaform]![cmb_atur5] and BONITET=1")),0,DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl5] and TURAD=[Formlar]![frm_Anaform]![cmb_atur5] and BONITET=1")) AS a1, IIf(IsNull(DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl5] and TURAD=[Formlar]![frm_Anaform]![cmb_atur5] and BONITET=2")),0,DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl5] and TURAD=[Formlar]![frm_Anaform]![cmb_atur5] and BONITET=2")) AS a2,IIf(IsNull(DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl5] and TURAD=[Formlar]![frm_Anaform]![cmb_atur5] and BONITET=3")),0,DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl5] and TURAD=[Formlar]![frm_Anaform]![cmb_atur5] and BONITET=3")) AS a3,IIf(IsNull(DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl5] and TURAD=[Formlar]![frm_Anaform]![cmb_atur5] and BONITET=4")),0,DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl5] and TURAD=[Formlar]![frm_Anaform]![cmb_atur5] and BONITET=4")) AS a4,IIf(IsNull(DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl5] and TURAD=[Formlar]![frm_Anaform]![cmb_atur5] and BONITET=5")),0,DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl5] and TURAD=[Formlar]![frm_Anaform]![cmb_atur5] and BONITET=5")) AS a5,
DLookUp("ALT","BON_ENDX","BONITET=1 and TUR_KOD=[Formlar]![frm_Anaform]![agk5]") & "-" & Dlookup ("UST","BON_ENDX","BONITET=1 and TUR_KOD=[Formlar]![frm_Anaform]![agk5]") AS b1,DLookUp("ALT","BON_ENDX","BONITET=2 and TUR_KOD=[Formlar]![frm_Anaform]![agk5]") & "-" & Dlookup ("UST","BON_ENDX","BONITET=2 and TUR_KOD=[Formlar]![frm_Anaform]![agk5]") AS b2,DLookUp("ALT","BON_ENDX","BONITET=3 and TUR_KOD=[Formlar]![frm_Anaform]![agk5]") & "-" & Dlookup ("UST","BON_ENDX","BONITET=3 and TUR_KOD=[Formlar]![frm_Anaform]![agk5]") AS b3,DLookUp("ALT","BON_ENDX","BONITET=4 and TUR_KOD=[Formlar]![frm_Anaform]![agk5]") & "-" & Dlookup ("UST","BON_ENDX","BONITET=4 and TUR_KOD=[Formlar]![frm_Anaform]![agk5]") AS b4,DLookUp("ALT","BON_ENDX","BONITET=5 and TUR_KOD=[Formlar]![frm_Anaform]![agk5]") & "-" & Dlookup ("UST","BON_ENDX","BONITET=5 and TUR_KOD=[Formlar]![frm_Anaform]![agk5]") AS b5,
IIf(IsNull(DLookUp("ORTA","BON_ENDX","BONITET=1 and TUR_KOD=[Formlar]![frm_Anaform]![agk5]")),0,DLookUp("ORTA","BON_ENDX","BONITET=1 and TUR_KOD=[Formlar]![frm_Anaform]![agk5]")) AS e1, IIf(IsNull(DLookUp("ORTA","BON_ENDX","BONITET=2 and TUR_KOD=[Formlar]![frm_Anaform]![agk5]")),0,DLookUp("ORTA","BON_ENDX","BONITET=2 and TUR_KOD=[Formlar]![frm_Anaform]![agk5]")) AS e2,IIf(IsNull(DLookUp("ORTA","BON_ENDX","BONITET=3 and TUR_KOD=[Formlar]![frm_Anaform]![agk5]")),0,DLookUp("ORTA","BON_ENDX","BONITET=3 and TUR_KOD=[Formlar]![frm_Anaform]![agk5]")) AS e3,IIf(IsNull(DLookUp("ORTA","BON_ENDX","BONITET=4 and TUR_KOD=[Formlar]![frm_Anaform]![agk5]")),0,DLookUp("ORTA","BON_ENDX","BONITET=4 and TUR_KOD=[Formlar]![frm_Anaform]![agk5]")) AS e4,IIf(IsNull(DLookUp("ORTA","BON_ENDX","BONITET=5 and TUR_KOD=[Formlar]![frm_Anaform]![agk5]")),0,DLookUp("ORTA","BON_ENDX","BONITET=5 and TUR_KOD=[Formlar]![frm_Anaform]![agk5]")) AS e5,DLookUp("Round([1],2)","REDUK","ISL_SIN=[Formlar]![frm_Anaform]![isl5]") AS rkat1,DLookUp("Round([2],2)","REDUK","ISL_SIN=[Formlar]![frm_Anaform]![isl5]") AS rkat2,DLookUp("Round([3],2)","REDUK","ISL_SIN=[Formlar]![frm_Anaform]![isl5]") AS rkat3,DLookUp("Round([4],2)","REDUK","ISL_SIN=[Formlar]![frm_Anaform]![isl5]") AS rkat4,DLookUp("Round([5],2)","REDUK","ISL_SIN=[Formlar]![frm_Anaform]![isl5]") AS rkat5,
IIf(IsNull(DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl5] and TURAD=[Formlar]![frm_Anaform]![cmb_atur5] and BONITET=1")),0,DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl5] and TURAD=[Formlar]![frm_Anaform]![cmb_atur5] and BONITET=1")) AS reduka1,
IIf(IsNull(DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl5] and TURAD=[Formlar]![frm_Anaform]![cmb_atur5] and BONITET=2")),0,DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl5] and TURAD=[Formlar]![frm_Anaform]![cmb_atur5] and BONITET=2")) AS reduka2,
IIf(IsNull(DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl5] and TURAD=[Formlar]![frm_Anaform]![cmb_atur5] and BONITET=3")),0,DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl5] and TURAD=[Formlar]![frm_Anaform]![cmb_atur5] and BONITET=3")) AS reduka3,
IIf(IsNull(DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl5] and TURAD=[Formlar]![frm_Anaform]![cmb_atur5] and BONITET=4")),0,DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl5] and TURAD=[Formlar]![frm_Anaform]![cmb_atur5] and BONITET=4")) AS reduka4,
IIf(IsNull(DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl5] and TURAD=[Formlar]![frm_Anaform]![cmb_atur5] and BONITET=5")),0,DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl5] and TURAD=[Formlar]![frm_Anaform]![cmb_atur5] and BONITET=5")) AS reduka5,
DLookUp("ALT","BON_ENDX","BONITET=[Formlar]![frm_Anaform]![boni5] and TUR_KOD=[Formlar]![frm_Anaform]![agk5]") & " - " & Dlookup ("UST","BON_ENDX","BONITET=[Formlar]![frm_Anaform]![boni5] and TUR_KOD=[Formlar]![frm_Anaform]![agk5]") AS bonar,
IIf(IsNull([Formlar]![frm_Anaform]![isl5]),"0","1") AS x, IIf(IsNull([Formlar]![frm_Anaform]![cmb_atur5]),"0","1") AS y
FROM SERVET
GROUP BY IIf(IsNull([Formlar]![frm_Anaform]![isl5]),"O" ,[Formlar]![frm_Anaform]![isl5] & "-" & [Formlar]![frm_Anaform]![agad5] & " " & "İşletme Sınıfında Ortalama Bonitet Tayini ve Redüktif Alan Hesabı:"), Dlookup ("Des_NomVal_Name_L1","Des_NomVal","Des_ID=48"), IIf(IsNull(DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl5] and TURAD=[Formlar]![frm_Anaform]![cmb_atur5] and BONITET=1")),0,DLookUp("sum(ALAN)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl5] and TURAD=[Formlar]![frm_Anaform]![cmb_atur5] and BONITET=1")), Dlookup ("ALT","BON_ENDX","BONITET=1 and TUR_KOD=[Formlar]![frm_Anaform]![agk5]") & "-" & Dlookup ("UST","BON_ENDX","BONITET=1 and TUR_KOD=[Formlar]![frm_Anaform]![agk5]"), IIf(IsNull(DLookUp("ORTA","BON_ENDX","BONITET=1 and TUR_KOD=[Formlar]![frm_Anaform]![agk5]")),0,DLookUp("ORTA","BON_ENDX","BONITET=1 and TUR_KOD=[Formlar]![frm_Anaform]![agk5]")),DLookUp("Round([1],2)","REDUK","ISL_SIN=[Formlar]![frm_Anaform]![isl5]"),IIf(IsNull(DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl5] and TURAD=[Formlar]![frm_Anaform]![cmb_atur5] and BONITET=1")),0,DLookUp("sum(REDUK)","SERVET","ISL_SIN=[Formlar]![frm_Anaform]![isl5] and TURAD=[Formlar]![frm_Anaform]![cmb_atur5] and BONITET=1")),DLookUp("ALT","BON_ENDX","BONITET=[Formlar]![frm_Anaform]![boni5] and TUR_KOD=[Formlar]![frm_Anaform]![agk5]") & " - " & Dlookup ("UST","BON_ENDX","BONITET=[Formlar]![frm_Anaform]![boni5] and TUR_KOD=[Formlar]![frm_Anaform]![agk5]")
HAVING (((IIf(IsNull([Formlar]![frm_Anaform]![isl5]),"0","1"))="1") AND ((IIf(IsNull([Formlar]![frm_Anaform]![cmb_atur5]),"0","1"))="1"));

isl1 veya atur1 dolu ise 1 yazar, sorguda her ikisi 1 olanları gösterir.
Tesekkur  alkis Çok teşekkürler. Herşey için. başka sorum olursa bu başlık altında yazabilir miyim?
Sayfalar: 1 2 3