Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Case thisform.txtbox.value = quotes
Message
 
 
To
10/11/2004 08:10:18
Carl Dobson
Reference Point Computers
Overbury, Tewks, United Kingdom
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 7
OS:
Windows XP
Database:
Visual FoxPro
Miscellaneous
Thread ID:
00959931
Message ID:
00959934
Views:
6
Carl,

Take a look at help for SET EXACT command. It explains why 'ALLTRIM(.txtcompany.VALUE) = ""' is always true with SET EXACT OFF. Use EMPTY() function to perform such check.
CASE EMPTY(.txtcompany.VALUE)
>My code:
>
>WITH THISFORM
>	DO CASE
>	CASE ALLTRIM(.txtcompany.VALUE) = ""
>		=MESSAGEBOX("No Company name has been Entered",0,"No Company Name")
>	CASE ALLTRIM(.txtbranch.VALUE)    = ""
>		=MESSAGEBOX("No Branch name has been Entered",0,"No Branch Name")
>	CASE ALLTRIM(.txtserver.VALUE)    = ""
>		=MESSAGEBOX("No Server IP has been Entered",0,"No Server IP")
>	CASE ALLTRIM(.txtip.VALUE)     = ""
>		=MESSAGEBOX("No Ip has been detected",0,"No Server IP")
>	CASE ALLTRIM(.txtfirebrick.VALUE) = ""
>		=MESSAGEBOX("No Firebrick IP has been Entered",0,"No Firebrick IP")
>	CASE ALLTRIM(.txttxtanother.VALUE)= ""
>		=MESSAGEBOX("No Other IP has been Entered",0,"No Other IP")
>	OTHERWISE
>		USE company
>		INSERT INTO company(company, branch, serverip, thisip, fireip, another, refip) ;
>			VALUES;
>			(.txtcompany.VALUE,.txtbranch.VALUE,;
>			.txtserver.VALUE,.txtIP.VALUE,;
>			.txtfirebrick.VALUE,.txtanother.VALUE,"81.187.187.68")
>	ENDCASE
>ENDWITH
>
>Am I making a silly mistake - case .value is empty then display message, simple ! What am I missing ?
--sb--
Previous
Reply
Map
View

Click here to load this message in the networking platform