tblFLOD is a table in the access db with one record
My SQL is:
SELECT tblService_component_list.[2012 Service_Component Structure], Sum(tblRejectedFiles.quantity) AS SumOfquantity, Sum(tblRejectedFiles.cost_local) AS SumOfcost_local, Sum(Round([cost_local]/[exchange_value],2)) AS [cost in Euro] FROM (((((((tblRejectedFiles LEFT JOIN (tblNiids LEFT JOIN tblOrganisation ON tblNiids.AAU = tblOrganisation.AAU) ON tblRejectedFiles.niids_nr = tblNiids.NIIDSNo) LEFT JOIN tblApplications_register ON tblRejectedFiles.application_code = tblApplications_register.App_code) LEFT JOIN tblOrganisation AS tblOrganisation_1 ON tblApplications_register.AAU = tblOrganisation_1.AAU) LEFT JOIN tblService_component_list ON tblRejectedFiles.service_component_id = tblService_component_list.Service_Component_ID) LEFT JOIN tblRate_of_exchange ON tblRejectedFiles.country_code = tblRate_of_exchange.Exchange_id) LEFT JOIN tblLineSAPChartOfAccounts ON tblRejectedFiles.SAP_Account = tblLineSAPChartOfAccounts.SAP_level_6_ID) LEFT JOIN tblOrganisation AS tblOrganisation_2 ON tblRejectedFiles.debit_acc_unit = tblOrganisation_2.AAU) LEFT JOIN tblOrganisation AS tblOrganisation_3 ON tblRejectedFiles.credit_acc_unit = tblOrganisation_3.AAU
WHERE (((tblRejectedFiles.rejected_Date)=[tblFLOD]![DateCurrentMth]))
GROUP BY tblService_component_list.[2012 Service_Component Structure];
Tilladte BB-code-tags: [b]fed[/b] [i]kursiv[/i] [u]understreget[/u] Web- og emailadresser omdannes automatisk til links. Der sættes "nofollow" på alle links.