Well... As I mentioned somewhere in the middle of the huge text :rolleyes: the problem is much more complicated, which would involve in sql something like:
IIF ( cdbl([Sp01 (12)])>(5*DAvg("[Sp01(12)]","t_Spoligo_Import_Temp","left([f2],2)='H2'")) AND cdbl([Sp01 (12)])>1000,1,IIF ( cdbl([Sp01...