Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Cancel Operation from a required field
Message
From
18/09/1996 22:38:06
Biju Varghese
M.H Alshaya Co W.L.L
Kuwait, Kuwait
 
General information
Forum:
Visual FoxPro
Category:
FoxPro 2.x
Miscellaneous
Thread ID:
00008117
Message ID:
00008158
Views:
38
> > Has anyone come up with a good method that will > allow a user to cancel an operation while they are > on a field that requires entry. > > They have requested to add a new record. > The user is then presented to a screen with X number > of fields, some of which are required and in their > VALID code states IF EMPTY(fieldname) THEN 'Field must > be filled' ENDIF > > but what if the user presses the CANCEL button, how do I > know that they have touched the CANCEL button so > as to let them out of the required field and let the CANCEL > valid be fired off. > > Any suggestion please. > > Bret Hi 1. Create a form level property or Object level property as lCancel and set lCancel = .F. 2. In the click event of cancel button (i). Change this lCancel property as thisform.lCancel = .T. [form level] OR IF TYPE('thisform.Activecontrol.lCance') # 'U' thisform.Activecontrol.lCancel= .T. [object level] ENDIF 3. In the valid of each object return value after checking lCancel value. LOCAL lRetval lRetVal = !Empty(this.value) RETURN IIF(lCancel,.T.,lRetVal) Hope this may help u. Thank Q Waheed
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform