They are different things. You can still change the page even the textbox contains an invalid value. The page change doesn't make the textbox to lose focus, that means no validation occurs.
If you want to prevent the page change you need to manually call the Valid() method, before changing the page, and change accordingly. On Fri, Oct 30, 2009 at 10:35 PM, Rafael Copquin <[email protected]> wrote: > In the valid put code like this: > > if condition is met > return 1 > else > error message > return 0 > endif > > In that way, the return to 0 when the validation fails will prevent the > lostfocus > > Happy Haloween > > Rafael Copquin > > > ----- Original Message ----- > From: "Kent Belan" <[email protected]> > To: <[email protected]> > Sent: Friday, October 30, 2009 4:28 PM > Subject: Lost Focus > > >> Happy Friday, >> >> Here is a good one for Halloween. >> >> I have a for with a pageframe with 2 pages. >> In the init I have set some function keys to set focus to other contols on >> the second page. >> >> On the first page in a text box, I enter an invalid value and then hit F5. >> It jumps to the second screen but it should have stopped on the valid >> first. >> >> How can I get the valid to fire before the focus is set to the second page >> ? >> >> Thanks, >> Kent >> >> >> [excessive quoting removed by server] _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/[email protected] ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

