Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Form Question...
Message
From
29/05/1999 03:19:08
 
 
To
28/05/1999 22:46:59
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00224267
Message ID:
00224283
Views:
17
>Everytime I attempt to run my form, it locks up after I enter something in the first field. There are only two fields on the form. Here is the valid method in my form on the first field. What is the deal here?
>
>IF EMPTY(ThisForm.HtcNoProTxt.VALUE) OR ThisForm.HtcNoProTxt.VALUE = '000' OR ThisForm.HtcNoProTxt.VALUE = '00' OR ThisForm.HtcNoProTxt.VALUE = '0'

Lets try some simplification here. Maybe this would be easier:

IF VAL(ThisForm.HtcNoProTxt.VALUE) = 0

> = MESSAGEBOX ("Invalid HTC ID! Please re-enter." , 0 + 64 + 0 , "Invalid HTC ID") = 0

This is making an unneeded compare; you don't need to try to compare the result of the function call with anything if you aren't saving or examining the result of the MESSAGEBOX() function call. You can drop the trailing = 0

> *ThisForm.HtcNoProTxt.GOTFOCUS
>ELSE
> THIS.ENABLED = .F.
> ThisForm.HtcNameProTxt.ENABLED = .T.
> ThisForm.Btn_Reset.ENABLED = .T.
> THISFORM.REFRESH()
>ENDIF
>
>Thanks, Jeff
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Reply
Map
View

Click here to load this message in the networking platform