In VFP, the menu is not an object contained in the form.
For this reason you can't use Thisform.
You have multiple choices. I believe the following list is not exhaustive.
- you can launch the form using the Name clause
do form whatever name variablename
- you can use _screen.activeform (not always)
- you can query _screen.forms
- you can store the form reference into a public variable, or a property of a public (variable) object
- you can store the form reference into a custom property of _screen
- you can pass form's reference to the menu / menu item, if the menu is defined inside a method of the form, like :
local ofrm
ofrm = ThisForm
...
on selection whatever... do myprocedure with ofrm
Respectfully,
Vilhelm-Ion Praisach
Resita, Romania