General information
Category:
Forms & Form designer
>The first form calls the second form from a command button. "do form form1 name o124"
>
>I was using a command button on the second form to check its windowstate by using (o124.windowstate). At this point I would get the error that it couldn't find o124.
Your variable has gone out of scope - o124 will go out of scope as soon as the click event has finished.
As for the FORMS collection, you could try something like:
FOR 1 = 1 TO _SCREEN.FormCount
IF _SCREEN.Forms(i).Name = 'Form1'
oForm = _SCREEN.Forms(i)
nWindowState = oForm.WindowState
...
EXIT
ENDIF
ENDFOR
I am sure there are eleganter ways, but that should work.
HTH
Les
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only