Form and Subform to update table

K

Kanga

Hi,

I have a form (invoice header) with an embedded subform (invoice lines).
The subform footer contains a subtotal for all the lines amount. In the main
form, the "total" field data source is the subform subtotal.

I'm fighting with two problems right now:

1) On the subform, I have two columns: invoice line amount in doc currency &
invoice line amount in $. The $ amount is sourced from the doc currency line
amount * rate. There are two subtotals on my subform: one for each column.
The subtotals are feeding the header form totals. Now, if I change the line
amount in local currency the header total is correctly updated. However -
although the amount in $ is updated at the line level, the header amount in $
doesn't get updated.
Would this be caused by the logic in the subform $ field?

2) Next to that the main form is linked to the invoice header table. I would
now like that the amount on the main form header updates the amount on the
invoice header table.
Therefore I used an "after update form" command and it worked.

Similarily I would also like that the subform updates line amounts update
the column in the "invoice line table". I also tried the "after update form"
command on this one but it doesn't "recognize" the subform fields that I'm
referring to and instead it prompts me to enter the values for these two
fields.
Did I set this all up wrong? Should I use a totally different approach?


Thanks a lot,
Géraldine
 
Top