Thanks.
Gives me:
SELECT TOP 10 [Name 1], [Profit ctr], ROUND((Sum([1To90]) + Sum([Not Due]) + Sum([91To120])) / 1000,0) AS Months0To3, ROUND((Sum([121To150])+Sum([151To180])) /1000,0) AS Months4To5, ROUND((Sum([181To365])) /1000,0) AS Months6To12, ROUND((Sum([MoreThan366])) /1000,0) AS [Months12+], ROUND(Sum(Total) / 1000,0) AS TotalDebt, ROUND(Sum([Bad Debt]) / 1000,0) AS BadDebt, Companies.Notes, Companies.ResponsibleFor
FROM (zarageddebt_CURR INNER JOIN [SELECT [Cost Centre] FROM Structure WHERE [Cost Centre] = Forms![TabsReport]![BusinessUnits1].Form.combo_CostCentreLevel GROUP BY [Cost Centre]
]. AS S ON S.[Cost Centre] = zarageddebt_CURR.[Profit ctr]) LEFT JOIN Companies ON Companies.CompanyName = zarageddebt_CURR.[Name 1]
GROUP BY [Name 1], [Profit ctr], Companies.Notes, Companies.ResponsibleFor
ORDER BY Sum([Bad Debt]) DESC , Sum(Total) DESC;
I have noticed this in my queries in that when saved, Access is changing the brackets to ].
When I want to edit them, I have to change them back to )