Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Terrence Ho
  Where is Terrence Ho?
 Hong Kong
 Hong Kong
 Terrence Ho
 To: Pete Sass
  Where is Pete Sass?
 Marathon, Ontario
 Canada
 Pete Sass
 Tags
Subject: RE: How to eliminate the Return Value from Vali...
Thread ID: 16112 Message ID: 16118 # Views: 1 # Ratings: 0
Version: Unknown Category: General VFP Topics
Date: Wednesday, October 09, 2002 3:33:02 PM         
   


> > Hi,
> >
> > In my Program, I have a Valid Event that vervify something then return a .F. value, so the foucs can not leave the control, but there is a problem that if I instantly press Save or Cancel Button, it will return to un-editing environment, but the RETUN .F. from Valid Event is still working, I can not add a new record because the the Valid Event instancely looping.
> >
> > Could any tell me how can I eliminate the RETURN .F. from the Valid Event??
> >
> > Thanks in advance
> >
> > Terrence
>
> Hi,
> If you are trying to ask how do you break out of a valid event on a form, have the valid event set up
> with a memory variable to control it.
> Assign a memory variable named lNoValidation=.F.
>
> The Valid Event code:
>
> IF lNoValidation=.F.
>
> If this.value=" "
> Return .F.
> ELSE
> Return .T.
> Endif
>
> ELSE
>
> Return .T.
> ENDIF
>
> On the mouse move event of your Cancel/Exit button set the value of lNoValidation=.T.
> Now when you click the Cancel command button the validation test will return .T. and
> let you out of the fields validation events.
>
> Hope this is what you wanted to know ?
>
> Pete from the Great White North ! (Only in Canada, ay...) Over and Out ...

Pete,

That a good idea, but I have to set back the value lNoValidation=.F. on Add or Edit Button, the problem still exist, because the Valid Event still internally working.

Terrence

ENTIRE THREAD

How to eliminate the Return Value from Valid Event Posted by Terrence Ho @ 10/9/2002 11:32:22 AM
RE: How to eliminate the Return Value from Vali... Posted by Pete Sass @ 10/9/2002 2:06:26 PM
RE: How to eliminate the Return Value from Vali... Posted by Terrence Ho @ 10/9/2002 3:33:02 PM
RE: How to eliminate the Return Value from Vali... Posted by Michael Gill @ 10/9/2002 9:18:16 PM
RE: How to eliminate the Return Value from Vali... Posted by Pete Sass @ 10/9/2002 10:25:08 PM
RE: How to eliminate the Return Value from Vali... Posted by Terrence Ho @ 10/10/2002 12:09:29 AM
RE: How to eliminate the Return Value from Vali... Posted by aktayal @ 10/10/2002 6:23:06 AM
RE: How to eliminate the Return Value from Vali... Posted by Pete Sass @ 10/10/2002 1:18:42 PM
RE: How to eliminate the Return Value from Vali... Posted by Travis Pick @ 10/10/2002 3:14:05 PM
RE: How to eliminate the Return Value from Vali... Posted by Terrence Ho @ 10/10/2002 4:20:12 PM
RE: How to eliminate the Return Value from Vali... Posted by RENE RELUCIO @ 10/11/2002 2:24:36 PM
RE: How to eliminate the Return Value from Vali... Posted by Rene Relucio @ 10/13/2002 12:20:41 PM
THANKS EVERYBODY Posted by Terrence Ho @ 10/15/2002 7:35:46 PM