Refreshing a subform

xavigepexavigepe Member Posts: 185
edited 2007-09-29 in NAV Tips & Tricks
We have a field in a form, and this form has a subform. We want some fields in the subform to change their values when a field in the form is changed. How can we get this without having to click in the subform?

Thanks

Comments

  • krikikriki Member, Moderator Posts: 9,096
    Make a function in the subform:
    Function UpdateTheForm:
    CurrForm.UPDATE(FALSE);
    

    On the main form, you have to give a name to the subform.

    On the OnValidate-trigger of the form, you have to put:
    CurrForm.SAVERECORD; // Optional, this saves the changes to the DB.
    CurrForm.MySubForm.FORM.UpdateTheForm();
    
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


  • krikikriki Member, Moderator Posts: 9,096
    [Topic moved from Navision forum to Navision Tips & Tricks forum]
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!


Sign In or Register to comment.