Options

Control a sum in a subform

ferrisferris Member Posts: 23
I have a form with a subform: in the subform there is a table box with the column "pond" (decimal).
The sum of "pond" must be 100: how can I control this sum?
I want to check this sum each time user change the master record or close the form.
What are the right triggers?
And how can I create a sum flowfield that sum only the detail row and not all the table?

Comments

  • BalelloBalello Member Posts: 61
    There's many ways to do this depending on the data flow.
    1) you can write a function on line table that check the value every time you create/update one line (so check the value on OnInsert/OnModify).
    2) you can create a field STATUS on header that sets if that value can be modified on lines and check the values when releasing.

    To add a flowfield you need a kee on the Lines table that contains the fields you use to filter the lines.
    I don't envy anybody who caught up his aim. I travel gladly.
  • BalelloBalello Member Posts: 61
    Moreover the key must have Pond as sumIndexField.
    I don't envy anybody who caught up his aim. I travel gladly.
Sign In or Register to comment.