I use the following code within a procedure on my menu and it works find when runing within the project. When I compile an executable and choose the menu option, I get the following error: "Form is not an object".
FOR x = 1 TO _screen.FormCount
if _screen.forms(x).name = alltrim(m.shttype)
_screen.forms(x).release
endif
ENDFOR
I used the following as a work around, but am interested in knowing why the above gives an error in an executable only.
DO FORM dirforms + "orders.scx"
_screen.forms(2).release
Thanking you in advance for your help.
FOR x = 1 TO _screen.FormCount
if _screen.forms(x).name = alltrim(m.shttype)
_screen.forms(x).release
endif
ENDFOR
I used the following as a work around, but am interested in knowing why the above gives an error in an executable only.
DO FORM dirforms + "orders.scx"
_screen.forms(2).release
Thanking you in advance for your help.