Hi all,
I have 2 different forms, form A and Form B. On each form I have a control. Form A -> "Reference Date", on Form B -> "New Date". When I open Form A, Form B opens automatically and the 2 controls are filled with the workdate.
Is it possible -and if so, how- to change the control "New Date" on Form B automatically when i give another date in the control "Reference Date" on form A, and vice versa?
Thanx in advance
0
Comments
Do It Yourself is they key. Standard code might work - your code surely works.
When I open form A, form B opens, both with the workdate as the default date.
But the problem is that, when I change my date in form A, he doesn't change on form B, so I put an "Update" in my function.
Then when I change my date in form A, I get a message that says : "The form is not open"
If lethere is a solution, please t me know! ](*,)
If I don't understand wrongly, the flow should be something like:
1. User open form A
2. in the form A, create an instance of form B (with and update function in it to update a global var inside form
3. use update function set global var in form B
4. open form B
Actually I am just re-iterating shenpe's answer.
Rgds,
Jon.
Jon.
Keep in mind that that way the 'vice versa' thing doesn't work. You can update the data on Form B from the Form A (since the Form A has created an instance of Form
Arhontis
https://forum.mibuso.com/search
One only heavy method : a timer on Form A that periodically reads information from Form B . But not recommended ...
Form A and form B open on the same time. After opening these forms, I want to change a variable on form A, and I want the variable on form B takes over these changes without closing and reopen.
Regards
What do you mean by "on the same time" ? Somethink like :
FormA.RUN;
FormB.RUN;
In this case, there is no link between both forms, so, to pass informations :
- work with a table where you put the information and read it back in the Forms with a timer.
OR
- work with a "single instance" CodeUnit 1, create a variable to store the information in the CU 1 and read it from the Forms with a timer.
As you see, not so easy ...
Nothing is easy here! :whistle:
No, it's a simple FormB.RUN in the Onopen trigger of FormA.
In form A I made a variable of form B, to call the function in form B that takes over the changes in Form A. But on form B, I have to use an UPDATE function in order to see the changes. When I use the UPDATE function it gives me the message that form B is not open.
The 'vice versa' stuff is no longer necessary.
Regards