Options

How can I update a SubForm?

dietmarruefdietmarruef Member Posts: 48
edited 2001-08-15 in Navision Financials
I have a problem with the CurrForm.UPDATE command. I make a Form with 1 Mainform and 3 SubForms. Now I try to update my Mainform if the Customer modifies the SubForm. But It does not work. Who has a solution for this Problem?

Dietmar

Comments

  • Options
    Lars_WestmanLars_Westman Member Posts: 116
    Sorry. But You can't update the main form from a sub form. The sub form simply isn't aware that it is a subform.

    //Lars
  • Options
    David_SingletonDavid_Singleton Member Posts: 5,479
    The only real solution is to use the on timer function in the main form for example.

    Create a flow field in the main table that sources the table in the sub form.

    In the OnModify trigger of the table on sub form, update the source field (eg. SubFormTable.RecModified := TRUE <img border="0" title="" alt="" src="images/smiles/icon_wink.gif" />

    Now the tricky part.
    If you just call CurrForm.Update(true/false), you will have problems if you are actually modifying the sub form, so you will have to spend some time deciding what logic will trigger the update.

    Don't forget to calcfields etc.

    this is just a starting point, so good luck.
    David Singleton
Sign In or Register to comment.