Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Forcing A value from a text box
Message
From
01/02/2002 10:41:01
 
 
To
01/02/2002 10:32:24
Carmen Gassi
Perseus Software Systems
Oakville, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00613826
Message ID:
00614030
Views:
35
Carmen,

So, I'm asking good questions but I haven't been able to sell you my story :)

Now, regarding the 'Abort' button. Personally, I prefer a 'Cancel' button, it sounds less deadly *grin*.

Set the cancel property of the button to .t. When the person hits this button (or presses escape), lastkey() will be 27.

In valid() of your textbox:
if lastkey()=27  && user wants to cancel
    return .t.
endif
&& put rest of validation code here
Does that help?


>Hi Steve
> Again good questions. These human generated numbers must be unique or they won't be accepted by the system. After the order number is in the system the user may change it and yes the changes cascade through the details of the order and the w.i.p. already entered. This has never been done that I can see. The usual approach is to delete the order and create a new one. Thanks for the tip re: return zero. Let me ask you this. While I can now keep them a captive audience until an order number is entered, I also have an abort button that should allow them a way out. If I use return .f., or return zero, it won't let me at the abort button. Any thoughts? Thanks again Steve.
>
Steve Gibson
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform