Hello, I'm building a database to keep track of bought products and sales in our company. I have an invoice form in which I can calculate the average product cost when it comes in, and then I need to use that value to calculate total warehouse value and also the profit margins in the sales form. However, there are several factors that influence this average cost, for example shipment costs can vary depending on the purpose and the final customer of an article, etc, so TLDR: it would be way easier to snapshot the current BoxID and AvgCost values in my invoice subforms and save them to a table for later use.
I have seen an option in the Macro generator that lets you save the current state of a subform to Excel, but not to another Access object 
I have also tried this
Code:
INSERT INTO AvgCostByID ( IDCaja, PVPUNITARIO )
SELECT [Formularios]![FACTURA_AEREO]![Subformulario FACTURA_AEREO_sub]![IDCaja] AS IDCaja, [Formularios]![FACTURA_AEREO]![Subformulario FACTURA_AEREO_sub]![AvgCost] AS PVPUNITARIO;
but it only retrieves the currently active record. I could use a macro to keep moving forward until I run out of records I guess, but I wonder if there's an easier way to grab everything in those 2 columns and create/annex/update a table with it.
Thanks in advance for any pointers!