Calculation problem in Customized Tables

ssinglassingla Member Posts: 2,973
The situation

Table 1 : Form 1 : Field 1 Field 2 Field 3 Field 4
Table 2 : Form 2 : Field 1 Field 2 Field 3

Relation :a) Field 1 of Both Table are same and linked.
b) Field 3 of of Table 1 is flow field of Field 3 of Table 2

User enters Field 2 on Form 1 and then goes to Form 2 and enter values in Field 2 & 3. More than one lines are created there. The link of Form 2 is on Form 1 and on exit of Form 2, Form 1 regain the focus.

Requirement : Calculation of Field 4 which is Field 2 * Field 3

Where to write the code to calculate the values. ](*,)
CA Sandeep Singla
http://ssdynamics.co.in

Comments

  • mjrogersmjrogers Member Posts: 59
    I think I would write the code on the validate of field 3 table 2. It should update field 4 of table 1.

    Also, add the same code to field 2 of table 1 in case field 2 is modified after table 2.

    Possibly you would want to put the code in the on delete / on modify triggers of table 2 as well...

    Or instead of using a table field you could just calculate the value on the form directly... on the on after get record trigger (I think) and use a temp var to display it...
    TecSA Malaysia

    Those of you who think you know everything are annoying to those of us who do. -
    David Brent
Sign In or Register to comment.