لسبب ما لا استطيع تحميل الملف
على كلا تستطيع اضافة زر للتقرير في النموذج
كذلك انسخ التالي للاستعلام q_dawar_defat1
SELECT dawar.bar, dawar.nfousi, NoufousTable.Field, dawar.datein, dawar.n_istimara, dawar.n_mortajaa, dawar.type, dawar.hala, dawar.MORTAJAA, dawar.timy, [n_istimara]-[n_mortajaa] AS ss
FROM hala INNER JOIN (type INNER JOIN (dawar INNER JOIN NoufousTable ON dawar.nfousi = NoufousTable.NoufousName) ON type.IrselyehTypeID = dawar.type) ON hala.fieldid = dawar.hala
WHERE (((hala.fieldid)=Nz([Forms]![F1]![tsearch],0)))
GROUP BY dawar.bar, dawar.nfousi, NoufousTable.Field, dawar.datein, dawar.n_istimara, dawar.n_mortajaa, dawar.type, dawar.hala, dawar.MORTAJAA, dawar.timy, [n_istimara]-[n_mortajaa]
HAVING (((dawar.datein)>=[Forms]![F1]![d1] And (dawar.datein)<=[Forms]![F1]![d2]) AND ((dawar.type)=IIf([Forms]![F1]![chkFirstOrder],1,0)) AND ((dawar.MORTAJAA)=False) AND ((dawar.timy)="1")) OR (((dawar.type)=IIf([Forms]![F1]![chkRenew],2,0))) OR (((dawar.type)=IIf([Forms]![F1]![chkReplacement],3,0)))
ORDER BY dawar.type;