Once again I turn to your help in the search for some answers.
In a simple way this is what I need: 1) push a command button on a form that will run another form passing to it the displayed data; 2) make some changes and validate them and push a menu button (this menu button allows me to either print the data or simply “register” it); and, 3) return to the first form.
I have already solved the first 2 points: either Form.RUN and Form.RUNMODAL seems to work for me. The 3rd one seems a little bit more complicated because I can’t go back to the previous form.
This is the code in the OnPush trigger of the command button:
IF CONFIRM(Question, TRUE) THEN BEGIN
…
…
…
COMMIT;
rec_TableName := Rec;
rec_TableName.SETRECFILTER();
Form.SETTABLEVIEW(rec_TableName);
Form.RUN; //Form.RUNMODAL; this seems to work as well
END;
in FormB you create 2 Function to set and get the value. Before you run the FormB you pass the value through SetValue function. Do what ever you want to do for g_Var in FormB. After user close (ACTION::Close) the form, you call GetValue function to get a modified value from B.