Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Stefan Wuebbe
  Where is Stefan Wuebbe?
 Hamburg
 Germany
 Stefan Wuebbe
 To: mk sharma
  Where is mk sharma?
 mumbai
 India
 mk sharma
 Tags
Subject: RE: how to bypass the vaid method
Thread ID: 249085 Message ID: 249093 # Views: 1 # Ratings: 3
Version: Visual FoxPro 9 SP2 Category: General VFP Topics
Date: Monday, December 28, 2009 11:44:52 AM         
   


> i want to bypass the valid method with a key
>
> ****
> form1.text2.valid
> ****
> SELE CUSTOMER
> if the escape is pressed than
>    return
> endif
>    
> IF EMPT(ACCODE)
>    MESSAGEBOX("Somthing is required",0,"||| alert |||")
>    return 0
> endif
> 
> 

> warm regards,
> mk.

As Akram pointed out, you can "Return .T." if LastKey()=27 at the beginning of your validation.

However, "form-level validation" is usually more user-friendly, so that on control-level you may (still "Wait Window" something, but) not want to "Return 0/.F." in order to let users choose their own preferred sequence.

(FWIW, in the sample code you would not need the "Select customer" line if you'd change the "IF EMPT(ACCODE)" line to "IF EMPT(customer.ACCODE)".
OTOH, if you do a "Select (some-work-area)", it's considered to be better practice to reset the work-area before the current method/procedure ends.)


hth
-Stefan

ENTIRE THREAD

how to bypass the vaid method Posted by mk sharma @ 12/28/2009 10:33:59 AM
RE: how to bypass the vaid method Posted by M. Akram Bhatti @ 12/28/2009 10:43:18 AM
RE: how to bypass the vaid method Posted by mk sharma @ 12/28/2009 10:57:40 AM
RE: how to bypass the vaid method Posted by Rahul Moudgill @ 12/28/2009 11:49:55 AM
RE: how to bypass the vaid method Posted by mk sharma @ 12/28/2009 11:29:47 AM
RE: how to bypass the vaid method Posted by Stefan Wuebbe @ 12/28/2009 11:44:52 AM
RE: how to bypass the vaid method Posted by tushar @ 12/28/2009 12:35:00 PM
RE: how to bypass the vaid method Posted by mk sharma @ 12/28/2009 1:26:31 PM
RE: how to bypass the vaid method Posted by ho me @ 12/28/2009 2:48:03 PM
RE: how to bypass the vaid method Posted by tushar @ 12/28/2009 4:59:53 PM
RE: how to bypass the vaid method Posted by tushar @ 12/29/2009 8:28:30 AM