>> that scoping of memory variables that are bound to a control behave differently depending on if a form is launched from a menu or from the click event of a button
Not true. The reason is that if a control is bound to a variable that is not in scope, VFP auto-creates a PUBLIC variable for that control. So if you run the form and the controlsource is not in scope it gets created as PUBLIC and thereafter there are no problems.
If you initialize the variable in the INIT() then it will be out of scope after the INIT() finishes.
Best advice is don't use variables as control sources. Either make them properties of the form itslef (they are always in scope then) or bind to the underlying data directly.
|