How to update a Texbox its textvalue

tompynationtompynation Member Posts: 398
Hi,

I got a form which contains a textbox.

This textbox his source expression is a global variable, namely
gv_TotaalAantalKG.


In the OnAfterGetRecord i place the default value for this variable:
gv_TotaalAantalKG := Rec.AantalKgTotaal;

Now this form also contains a button, wich changes the value of this
gv_TotaalAantalKG on the button press.

<Control1000000038> - OnPush()
gv_TotaalAantalKG := StandaardProductie;

Now the problem is that this new value isnt visible on the form, i only see the old value...

Updating the form doesnt work either

<Control1000000038> - OnPush()
gv_TotaalAantalKG := StandaardProductie;
CurrForm.UPDATECONTROLS;
CurrForm.UPDATE(FALSE);

How can i make the form show the new value on the button press?

Answers

  • einsTeIn.NETeinsTeIn.NET Member Posts: 1,050
    The problem is not that the form is not updated, but OnAfterGetRecord is executed once again after you have changed the value of your global variable.
    "Money is likewise the greatest chance and the greatest scourge of mankind."
Sign In or Register to comment.