Ask Your Question
1

Base Calculation - sum of subtotals question

asked 2016-12-24 17:54:15 +0100

DougKMiles gravatar image

I'm trying to create a one-to-many database to track option trading covered calls. The set up is very similar to an invoice. The many records have simple calculations that yield subtotals for each line in a sub-form, all linked to a unique master record, the specific Trade ID.

I've been able to set up the sub-total calculations records for each Trade that work correctly, and I've been able to create a query that produces a sum of subtotals linked to each trade ID. But I cannot get that sum to work correctly in the form. It will show the correct sum for the first Trade ID, but then will not update when moving to the next master record. It stays on the sum for the first master record.

After a day of trying to find the solution, record refreshing, changing linked fields, etc., I've hit the wall.

If anyone has any thoughts, potential solutions, or recommended tutorials to help solve this, I would be most grateful.

Thanks! DM

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
1

answered 2016-12-24 20:44:36 +0100

Ratslinger gravatar image

It's really just a matter of proper linking. Attached is a sample demonstrating this. In Form1, the top grid is the main form and retrieves the company. The grid under is is on a subform linked to the company selected. It shows the products carried by the company. In a subsubform for the Total, is an SQL statement selecting the total minimum quantity for the products grid. It is linked to the Products table.

When you select a different company, its' products appear on the grid below it and the total min quantity is displayed is the box below it.

Sample: TableTotals.odb

edit flag offensive delete link more

Comments

THANK YOU so much for your help.

It took a little bit of trial and error, but I finally got it!

Santa Claus brought me a solution!

DougKMiles gravatar imageDougKMiles ( 2016-12-24 23:15:24 +0100 )edit

You're welcome - Peace on Earth!

Ratslinger gravatar imageRatslinger ( 2016-12-24 23:36:43 +0100 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2016-12-24 17:54:15 +0100

Seen: 89 times

Last updated: Dec 24 '16