SELECT RE_calendario.AA, RE_calendario.MM, RE_calendario.Mese, RE_calendario.GLav,
DSum("GLav","RE_calendario","AA=" & [AA] & " And MM <=" & [MM]) AS GProg,
DSum("GLav","RE_calendario","AA=" & [AA]) AS GTot,
DSum("GLav","RE_calendario","[AA]=" & [AA] & " And [MM]>=1 AND [MM]<=" & [MM]) AS Pr01,
DSum("GLav","RE_calendario","[AA]=" & [AA] & " And [MM]>=2 AND [MM]<=" & [MM]) AS Pr02,
DSum("GLav","RE_calendario","[AA]=" & [AA] & " And [MM]>=3 AND [MM]<=" & [MM]) AS Pr03,
DSum("GLav","RE_calendario","[AA]=" & [AA] & " And [MM]>=4 AND [MM]<=" & [MM]) AS Pr04,
DSum("GLav","RE_calendario","[AA]=" & [AA] & " And [MM]>=5 AND [MM]<=" & [MM]) AS Pr05,
DSum("GLav","RE_calendario","[AA]=" & [AA] & " And [MM]>=6 AND [MM]<=" & [MM]) AS Pr06,
DSum("GLav","RE_calendario","[AA]=" & [AA] & " And [MM]>=7 AND [MM]<=" & [MM]) AS Pr07,
DSum("GLav","RE_calendario","[AA]=" & [AA] & " And [MM]>=8 AND [MM]<=" & [MM]) AS Pr08,
DSum("GLav","RE_calendario","[AA]=" & [AA] & " And [MM]>=9 AND [MM]<=" & [MM]) AS Pr09,
DSum("GLav","RE_calendario","[AA]=" & [AA] & " And [MM]>=10 AND [MM]<=" & [MM]) AS Pr10,
DSum("GLav","RE_calendario","[AA]=" & [AA] & " And [MM]>=11 AND [MM]<=" & [MM]) AS Pr11,
DSum("GLav","RE_calendario","[AA]=" & [AA] & " And [MM]>=12 AND [MM]<=" & [MM]) AS Pr12
FROM RE_aamm INNER JOIN RE_calendario ON RE_aamm.A = RE_calendario.AA
ORDER BY RE_calendario.AA, RE_calendario.MM;
Mi pare faccia quanto hai esposto nel primo Post.