Hi All,
Good day. I am new born to VBA and tried writing a SQL query to produce the list of details in year wise DESCENDING order for the input - Agent ID.
In addition to that I need to get the sum of amount fields year wise in the report. How to achieve it???.
Please find the attached report for better clarification.
First three column in the attachment is the outcome of the below listed query. Whereas the fourth column is the expected result which needs to be included..
How to alter the code in order to provide the SUM of Importo field every year.???
Thanks in advance. Appreciate your time.
Good day. I am new born to VBA and tried writing a SQL query to produce the list of details in year wise DESCENDING order for the input - Agent ID.
In addition to that I need to get the sum of amount fields year wise in the report. How to achieve it???.
Please find the attached report for better clarification.
First three column in the attachment is the outcome of the below listed query. Whereas the fourth column is the expected result which needs to be included..
Code:
SELECT CessioneCredito.Data_Movimento, CessioneCredito.Anno, CessioneCredito.Importo FROM CessioneCredito
WHERE (((CessioneCredito.ID_Agente)=[Reports]![R_StoricoCessCredAg]![ID_Agente]))
ORDER BY CessioneCredito.Data_Movimento DESC;
How to alter the code in order to provide the SUM of Importo field every year.???
Thanks in advance. Appreciate your time.