Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

SubForm not linking to master form

I have a subform created from a query that includes a simple calculation, then a subsubform that totals those calculations.

I've been able to produce a total that updates with the master records in one early version of my form, but in a newer version I can get a total for the first master record, but it will not update when moving to the next master record. The SQL Command for both is identical, so I can't figure out why one works and the other doesn't.

Here's the code for the functioning version:

SELECT SUM( "SubTotal"."SubTotal" ) AS "Total", "Trade"."TradeID" FROM "Trade", "SubTotal" WHERE "Trade"."TradeID" = "SubTotal"."TradeID" GROUP BY "Trade"."TradeID"

Here's the code for the one that provides only the first master record total (column names are slightly different in the new version):

SELECT SUM( "Subtotal"."Subtotal" ) AS "Total" , “Trade”.”Trade_id” FROM "Subtotal", "Trade" WHERE "Trade"."Trade_id" = "Subtotal"."Trade_id" GROUP BY "Trade"."Trade_id"

Many thanks in advance for any thoughts or assistance.