Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Valid Event
Message
From
15/01/2003 00:40:45
 
 
To
15/01/2003 00:37:04
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Title:
Miscellaneous
Thread ID:
00741764
Message ID:
00741765
Views:
26
>In textbox valid event i put this code that check if the code already exist
>
>if seek(this.value, 'Customer1')
> return .f.
>endif
>
>I want that when user press cancel button this valid event shouldn't fire.

One way to do it is to activate a flag when cancel is pressed, such as ThisForm.lQuiting=.T. So, you could use a verification here to detect that and don't proceed if it is in effect.
IF ThisForm.lQuiting
   RETURN
ENDIF
if seek(this.value, 'Customer1')
	return .f.
endif
There might be better ways to do it. This is just one approach.
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform