Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Can I abort a form from the Init method?
Message
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows XP SP2
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01286760
Message ID:
01286761
Views:
18
Jim,

Yes, just return .F. from the Init if the condition is not met and the form would not instantiate. Same works for Load method as well.

BTW, 50 seconds must be a UT record <g>

>I have a form that is called from other forms. It is called to perform a task that may not be possible with the given incoming parameter.
>
>In the Init method of the form, I want to check to see if the task is possible, and, if it is not, present a message to that effect, and abort the form.
>
>However, I can't find a way to abort the form. Instead it opens, and the user must click my Cancel button to close it.
>
>How can I prevent a form from running from the Init method?
>
>Thanks in advance for your help.
>
>Jim
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform