General information
Category:
Forms & Form designer
Title:
Returning form value
I have a form which is normally modeless, but there is the odd occassion when I need to call it as modal and return a value. I want to do this using the code...
DO FORM MyForm WITH 'MODAL' TO lcMyVar
When MyForm.Init() receives the parameter it converts the form to modal (windowtype=1).
The problem is I am getting the error message 1982 "The TO clause can only be used with modal Forms and FormSets" as soon as the form is called (ie. before the init() runs). I guess VFP is looking at the initial window type property setting as soon as it sees the TO clause rather than waiting until form.init has run.
Is there any other way around this problem? I don't want to have to duplicate the form just to change one property! Any help would be appreciated. I am using VFP7.
Alan
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only