> i have a menu option with two lines of code
>
> ? wexist('gform') &&returns .t.
> gform.visible = .f. &&returns error "object gform is not found"
>
> not sure why that second line does not work if the form exists.
> how do i manipulate the form properties from within the menu?
> when i ran the form i am using "do form gform name gform"
You're right, the Name clause of Do Form is a good way to go.
Your description sounds as if the variable falls out of scope, which would be default behaviour for Local and Private / spontaneous variables in Vfp.
You can store the reference in any persistent place, like a ParentForm.Property or a public property or variable. (The latter is not really recommended)
_screen.AddProperty('oGForm')
do form gform name _screen.oGForm
(WEXIST() only says there is window "gform" defined.)
hth
-Stefan