Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Catch 22 when validating data
Message
 
To
18/01/2002 13:37:52
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00606910
Message ID:
00607012
Views:
26
Hi Chris,

Like Brett I use some Doug H code with some modification and a separate validation method:
IF  This.Parent.lFieldLevelValidation 

	* Get the location of the mouse pointer

	loObject = SYS(1270)

	* Determine if a validation is required. 
	*    
	*   Cancel, Form closed, or ShiftTab skip validation.
	*   Enter, TAB, or autoadvance do validation

	llValidate = NOT (INLIST(LASTKEY(), cnKEY_ESCAPE, cnKEY_SHIFTTAB) OR ;
	           (TYPE('loObject.lCancel') = 'L' AND loObject.lCancel AND loObject.Enabled = .T.) OR ;
	           (TYPE('ThisForm.ReleaseType') = 'N' AND ThisForm.ReleaseType > 0))
ENDIF

RETURN IIF(llValidate, This.Parent.ControlValidation(), llRetVal) 
HTH some

Bob
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform