Bill-
On the outer form, put a text box named txtTotal with a Control Source something like:
=DSum("[Qty] * [Price]", "tblInvoiceItems", "InvoiceID = " & [InvoiceID])
In the AfterUpdate and AfterDelConfirm events of the form in the subform control put this:
Me.Parent.txtTotal.Recalc
John Viescas, Author
Microsoft Access 2010 Inside Out
Microsoft Access 2007 Inside Out
Microsoft Access 2003 Inside Out
Building Microsoft Access Applications
SQL Queries for Mere Mortals
(Paris, France)
On Feb 6, 2015, at 10:05 PM, 'Bill Singer' Bill.Singer@at-group.net [MS_Access_Professionals] <MS_Access_Professionals@yahoogroups.com> wrote:
I am attempting to put together an invoice. The invoice will be the main form. The items, including the price, will be on a continuous sub form.
I would like invoice to calculate the total and taxes automatically. However I am having a hard time figuring out how to get the total from a the sub form to transfer on to the main form.
I am still putting my tables together for this but I know this is where I will get stuck.
Maybe there is a sample database I can look at?
Thanks for steering me in the right direction.
Bill
Minnesota.
__._,_.___
Posted by: John Viescas <johnv@msn.com>
| Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (2) |
.
__,_._,___
Tidak ada komentar:
Posting Komentar