Subform not updating from main form....

The problem is that my subform will not update from the main form without clicking on the subform and running up and down the records.

On my main form I have just 1 control containing the global 'LocationFilter', there is no data on the main form.

I then have a subform which contains several FlowFields across it.

My 'LocationFilter' works because when I directly click on one of the subform records after applying it I get the correct filtered amount.

To get this to work in the OnValidate trigger of the 'LocationFilter' I have the following:

MySubformData.SETFILTER("Location Filter",LocationFilter);
CurrForm.Subform1.FORM.SETTABLEVIEW(MySubformData);

I have tried the obvious CurrForm.SubForm1.UPDATE in there but get a message that it cannot be updated.

Please help me asap anybody, it will be SO VERY appreciated :D:wink:

Comments

  • Solved it now - DOH!!

    I created a function in the subform called UpdateForm with just the CurrForm.UPDATE line of code....

    Then called this from the main form and no more errors \:D/ \:D/ \:D/

    Sorry to post this, should have tried a bit longer :oops:
  • Can you change your title to something meaningful?
    Please see Forum Rule #7: Forum Rules.

    If someone posts a topic it is (mostly) because (s)he needs help. So it is best to describe the problem in the title.
    Regards,Alain Krikilion
    No PM,please use the forum. || May the <SOLVED>-attribute be in your title!