>Hi all,
>
> can someone please tell me how to pass a variable value from a from to a .prg program. I know how to pass variable between .prg and .prg programs, pass variable between forms. but i cannot pass a variable value from a form to a .prg program.
This may not seem easy, but is more stable, and it's been tried and proven to work. You need a property in your form which will accept the value:
do form myform noshow name oForm
oForm.myproperty=myVar
oForm.show()
If your form is modal, you can hide it instead of releasing it when you're done with it (i.e. user closes it), and the oForm variable will still hold a reference to it. You can retrieve the values of any properties of the form, even run any methods in it, before you issue oForm.release in your code.
If the form is not modal (or not shown as modal), your .prg will run from the oForm.show line and will not wait for the form to close or hide. The oForm variable will go out of scope - haven't tried this with modeless forms, so I don't know whether the form will stay in existence or not. If you instantiate it as ...name oForm linked, it surely will disappear when variable oForm goes out of scope.