Forms4 - How2 sum column of detail records in relation obj

From: Scott Orman <scott_orman_at_rc.trw.com>
Date: 28 Sep 1994 23:24:27 GMT
Message-ID: <36ctvb$oot_at_picard.rc.trw.com>


   I have a Form in which I defined a master-detail relationship. The master block displays a single record, while the detail block displays 10 records at a time. I have several calculated items within the detail block and would like to calculate the sum of "factored_cost" column:

       Quantity  x  Unit_Cost   = Total_Cost   x  Probability  = Factored_Cost
       (base)           (base)           (calculated)       (base)           (calculated)

Normally I would think the approach would be to set up a cursor, get the number detail records, and loop through to come up with the sum. But since I have defined this relation using the Block definition screen, I'm confused.

  1. Is there some SYSTEM.xxxxx built-in which tells me the name of the cursor that the Form has set up?
  2. How do I know how many records (rows) there are, when the user is able to keep adding new rows without commiting them? I need these calculations to update on the fly as the user adds new records and makes changes to the various fields (Quantity, Unit_Cost, Probability).

  Thank you in advance for any help.

  • Scott
Received on Thu Sep 29 1994 - 00:24:27 CET

Original text of this message