Full Version: Newbie question about summing values from a subform
UtterAccess Discussion Forums > Microsoft® Access > Access Forms
lkelly
OK, so I'm just getting back up to speed in Access, and here's what I'd like to do...

For simplicity's sake, here's a description of my table setup:

tblTransaction
TransactionID
Name
Total

tblTransactionDetail
SubtotalID
TransactionID
DetailSubtotal

A transaction total MIGHT have a breakdown into subtotals (not always). If it does have a breakdown, the sum of all DetailSubtotals with the same TransactionID should equal the Total from tblTransaction. Hopefully that makes sense.

I've created a form with a subform that lists the relevant data. The values from tblTransactionDetail are listed in the subform. Right now there isn't any validation to make sure the sum of all DetailSubtotals equals the transaction Total. I'd like to know how to put a control in the Form that shows the sum of all the DetailSubtotals in the subform.

Like I said, it's been a while since I used Access, so any help would be wonderful. Thanks.
fredrisg
Here's a good site to visit regarding references to controls: Refer to Form and Subform properties and controls

I just used it yesterday to reference a control on a subrpt's subreport!

Steve
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.