Calculate field in Header with value of sumindex field

SjoerdSjoerd Member Posts: 13
Hi there,
A simple question for you who know, but i can't figure it out:

I have made two new tables, one header and a lines table.

the lines table has an amount field, which is filled with a Quantity * unit price formula, works fine.
The header table has a sumindex field, which shows correctly the sum of the amount of all lines.

I also have another field, sales value, which is filled in manually.

The problem I have is with a field called Markup, which calculates the markup, based on a calculation that uses the sumindex field and the "sales value" field.

This formula works fine, After updating manually the "sales value" field.

What i would like to do and i am asking your help for:
How can I make this calculation run automatically after updating the quantity or the amount field.
The sumindex field in the header is updated, but how can i trigger the markup field to be calculated? ](*,)

thanks

Comments

  • David_SingletonDavid_Singleton Member Posts: 5,479
    Put the controls ont he subform instead of the main for, its a lot easier that way.
    David Singleton
  • SavatageSavatage Member Posts: 7,142
  • SjoerdSjoerd Member Posts: 13
    Thank you for your quick reactions!

    If I understand this example well, it will calculate the markup per line, am i right?

    Maybe I did not mention good enough that the sales value field is manually introduced in the header. I would like to save the markup value in the header table. In my newbee experience i am feeling like i need some kind of a "on validate" functionality that triggers after the sumindex field in the header is updated, but there seems to be no trigger for that.
Sign In or Register to comment.