Welcome! Log In Create A New Profile

Advanced

passing info from 1 window to another at run time

Posted by daSpud 
passing info from 1 window to another at run time
February 04, 2022 04:13PM
WD26 I have a window (WIN_A) that uses OpenSister on a window (WIN_cool smiley. From that WIN_B I would like to fill in an EDT field in WIN_A. WD happily lets me code it as WIN_A.EDT_xx but at execution time it dies with unknown control.
I think I have done this is the past, but I don't remember how. Any ideas? Thank you
Re: passing info from 1 window to another at run time
February 04, 2022 04:27PM
Hi,

there is PreviousWin()

MyString = PreviousWin() // retrieve the name of the calling window
{MyString + ".MyEditControl"} = ZUTGRUPPE.ZGR_NUM // a ComboBox Control named

and there are global variables

in Project Code

GLOBAL
MyString is ANSI string

All windows are able to access Mystring ...

Kind regards,
Guenter Predl
office@windev.at
the only constraint to do win_A.EDT_xxx=value from win_B is that win_A is open at the time of execution of the code. This works without any problem in that case

So there must be an error in your code and you are not doing what you think you are doing, or not doing it at the time you think you are doing it.
Re: passing info from 1 window to another at run time
February 04, 2022 11:10PM
There was no error in the code and the window was open as it was the sister window. Not sure but when I went back to try it again it worked as expected.

I guess the lesson here is that if something doesn't work that you thought should work then try it again.

Very strange.
Re: passing info from 1 window to another at run time
December 01, 2022 12:27AM
I am trying to do something similar but would like to access a query of the previous window. I can access a table based on the query but not the query.

Any suggestions?

Jeff Graham
Cascade Consulting
Marc De Swert
Re: passing info from 1 window to another at run time
December 01, 2022 12:10PM
or,

you can give it as parameters in de receiving window

MDIOpen(Custumor_Detail, p_WinAlias, p_WinTitel, TBL_ID, p_name, True, Handle())

Marc
Marc De Swert
Re: passing info from 1 window to another at run time
December 01, 2022 02:48PM
and you can place the child window above the calling window
OpenChild(WIN_midichildnr2,STC_NoName1)
WinStatus(WIN_midichildnr2, Above)

Marc
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: