8
I have a table with Quant
and Preço
.
On the form, beyond these fields, I have the field Total = [Quant]*[Preço]
Also, in the main form I have the field SomaTotal = Soma([Total])
That is, the classic sum of prices that everyone knows how to make.
Question:
How do I put that total on a Sales list?
That is, I have this total for each sale, but I needed a list that would return me all sales, and the total of each of them.
I’d have to make a nested consultation?
The image is illustrative. I need this list on MS Access.
Are you doing this via SQL or otherwise? (sorry ignorance, I don’t know anything about MS Access) If it is via SQL, look for
GROUP BY
. Otherwise, it has an article which explains step-by-step how to do this using the "Report Wizard" (Report Wizard). P.S. I would post this as an answer, but as I said, total ignorance in Access, would end up just talking nonsense...– mgibsonbr
#mgibsonbr the word GROUP BY helped me. I made a query SQL: SELECT detVendas.id, Sum([Quant]*[Preco]) AS Total FROM detVendas GROUP BY detVendas.id; Thanks
– Regis Santos
@Regisdasilva if you want, you can add your comment as the answer to the question, and accept as the correct answer. Facilitates for those who want to search in the future on the site...
– woliveirajr