Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Rahul Moudgill
  Where is Rahul Moudgill?
 Toronto
 Canada
 Rahul Moudgill
 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: 249094 # Views: 1 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: General VFP Topics
Date: Monday, December 28, 2009 11:49:55 AM         
   


> i have a grid control on my form and want to come out from the grid with escape
>
>
>
> is this work in lostfocus
>
>
SELECT CUSTOMER
> IF LAST() = 27
> thisform.text3.setfocus()    && is this work in valid or lostfocus
> RETURN .t.
> ELSE
>   IF EMPTY(AcCode)
>     MESSAGEBOX("Somthing is required",0,"||| alert |||")
>      Return .f.
>    ELSE
>      RETURN .t.
>    ENDIF
>  ENDIF
>  

>
>
> >
> > The best place to validate is the LostFocus() event, since it can set focus back to the same control. For trapping the keyboard keys pressed, best method is KeyPress() event of the control.
> >
> > Anyhow if you need code for ESC key then:
> >
> >
> >
SELECT CUSTOMER
> > IF LAST() = 27
> >   RETURN .t.
> > ELSE
> >   IF EMPTY(AcCode)
> >     MESSAGEBOX("Somthing is required",0,"||| alert |||")
> >     Return .f.
> >   ELSE
> >     RETURN .t.
> >   ENDIF
> > ENDIF
> > 

> >
> > Regards,
> > akram

Press CTRL+TAB for Exit from Grid Control

or Use:

KEYBOARD '{CTRL+TAB}'

Rahul

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