Reputation: 11
In the main form after creating or editing a supplier this is not updated, add in the init method and in the refresh method this code
THISFORM.Refresh()
THISFORM.TName.Refresh()
THISFORM.TEmail.Refresh()
THISFORM.TPhone.Refresh()
but the main form is still not updated. I must close the main form so that the data is updated.
Is it possible from CreateSupplier or EditSupplier, access and refresh the text boxes of the main form?
Upvotes: 0
Views: 83
Reputation: 23797
(would be a mess as a comment)
You are not referencing what you call "main" form. You are refreshing thisform, IOW the form where that code runs. And you don't need individual refresh() calls. Thisform.refresh() would call refresh on all of its objects contained within. You need that "main" form's reference to refresh it. While calling CreateSupplier, EditSupplier forms pass main form's reference. ie:
* Main form button calling CreateSupplier
Do form CreateSupplier with thisform
* CreateSupplier init
lparameters toCallerForm
this.AddProperty('oCaller', m.toCaller)
Then anywhere in CreateSupplier you could call:
thisform.oCaller.Refresh()
Upvotes: 2