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:51:16
Carmen Gassi
Perseus Software Systems
Oakville, Ontario, Canada
 
 
To
01/02/2002 10:41:01
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00613826
Message ID:
00614045
Views:
37
Hi Steve
While I haven't bought your story :) you have provided an excellent solution. Thanks the cancel property .t. coupled with the code in the valid() of the textbox worked to a charm, and I don't have to code all of the controls as a result. Thanks again to all contributors, it's interesting that so many slightly different approaches will eventually all work. Thanks.

Regards,
Carmen
>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.
>>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform