Store report $ totals into table

Terri58ds

~rusty Access user~
Local time
Yesterday, 18:01
Joined
Jun 13, 2008
Messages
12
I wish to store the $ totals calculated on an invoice/report back into an invoice summary table. How can I do this using VBA?

I currently produce a daily invoice for labour and materials used on a job which is signed by the client daily.
From a form I enter the job number, date, invoice number and work description into text boxes. The work items relating to this data is displayed in a list box.
A command button (cmdOutputReport) then calls up the invoice (rptDailyInvoice) and outputs to a PDF with VBA.
The report source is a query which gets the client information, based on the form's text boxes for the report header.
The report has two subreports (srptLabour and srptMaterials) which each list all items and costs for the report date and displays a Subtotal. The report has a total field which adds the Labour Subtotal and Material Subtotal for a Grand total.

At the end of the month all daily invoices are submitted for payment and must be accompanied by a summary sheet listing all the daily invoices by job number, date, invoice number, work description, both subtotals and grand total. In order to do this I created a table (tblInvoiceSummary) to store these fields except for (GrandTotal). Using VBA on the cmdOuputReport button I can populate the first 4 fields from the text boxes on the form but don’t know how to get the 2 subtotals from the report back into variables that I can store into the table.

TIA.
 
Normally one does not store derived values in a database. These values should be generated directly from the data as required.

Use a query on the invoice information, group by invoice and sum the dollar values.

Search the forum for "normalization" to understand why derived values are rarely stored.
 

Users who are viewing this thread

Back
Top Bottom