Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Returning form value
Message
From
11/07/2003 10:42:36
Alan Harris-Reid
Baseline Data Services
Devon, United Kingdom
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Returning form value
Miscellaneous
Thread ID:
00809202
Message ID:
00809202
Views:
65
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
Map
View

Click here to load this message in the networking platform