Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Form return value
Message
From
06/08/2007 21:58:08
Alan Harris-Reid
Baseline Data Services
Devon, United Kingdom
 
 
To
All
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Form return value
Miscellaneous
Thread ID:
01246371
Message ID:
01246371
Views:
116
I have a form which is called using DO FORM MyForm WITH param1,param2 TO lcResultString. If param2='VALIDATE' I wish to validate param1 only and not place the form in interactive mode. The Init() code is something like this...

IF param2='VALIDATE'
form.ReturnProperty = Validate(param1) && returns success value
RETURN .F. && form is not displayed and execution moves to form.Unload()
ELSE
Form displays in interactive mode.
ENDIF

When the form is in interactive mode, a character string is returned and everything is fine. However, if Init() returns .F., lcResultString in the above DO FORM command is always .F., no matter what the value of form.ReturnProperty is. I have traced code execution and form.ReturnProperty has the correct value (eg. 'VALID') right up to the RETURN line of the Unload() event.

Has anyone any idea how to overcome this problem? In case it is relevant, I am using VFP9 SP1. The form is definitely modal.

Any help would be appreciated.

Alan
Next
Reply
Map
View

Click here to load this message in the networking platform