In the VALID Event of that offending control:
RETURN 0 

Which means: don't move the focus from that control.

If several controls together can do harm to the page control, just disable all 
other pages.  That's the equivalent of a modal page :)

FOR EACH oPage IN Pageframe.pages
        oPage.Enabled = oPage.name = thisPage.name
ENDFOR
&& set appropriate objectNames for your code


wOOdy


-----Ursprüngliche Nachricht-----
Von: ProFox <profox-boun...@leafe.com> Im Auftrag von MB Software Solutions, LLC
Gesendet: Donnerstag, 2. Januar 2020 15:50
An: ProFox Email List <profox@leafe.com>
Betreff: Easiest way to keep person from navigating off a page

VFP9SP2. Scenario: pageframe with several pages.  Goal: force user to stay on 
page if invalid data entry on that page.

I'm trying to think of the best, non-kludgey way to prevent the user navigating 
to a different tab if an invalid condition exists.  I was dabbling with the 
Page.Activate but I'm starting to get kludgey with flags and trickery.  There 
is no Page.Valid event.

Suggestions?


[excessive quoting removed by server]

_______________________________________________
Post Messages to: ProFox@leafe.com
Subscription Maintenance: https://mail.leafe.com/mailman/listinfo/profox
OT-free version of this list: https://mail.leafe.com/mailman/listinfo/profoxtech
Searchable Archive: https://leafe.com/archives
This message: 
https://leafe.com/archives/byMID/010601d5c17e$fdc20a50$f9461ef0$@wondzinski.de
** 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.

Reply via email to