Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
IF..ELSE...ENDIF Statements
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
IF..ELSE...ENDIF Statements
Miscellaneous
Thread ID:
00757414
Message ID:
00757414
Views:
56
Below is a section of code I am using to create a cursor for a report. My question is this: Why on the lines I have marked with Asterisks does the variable "lcStr" not contain the same reference value that all the other references to it do. I am checking this by hovering my mouse over it in Debug. In some places it shows a value and in others it doesn't. That's messing up my results. Why wouldn't it contain the same value? Does it have something to do with all the IF.. ELSE.. ENDIF nesting I'm doing here?

Thank you for your help.
IF !EMPTY(tmpLiquid.rec_servic)
   lcStr = UPPER(ALLTRIM(tmpLiquid.rec_servic))
	IF LIKE("RETEST 1 YEAR", lcStr)
		REPLACE ss WITH "A"
	ELSE
         	IF !LIKE("*DEHYDRATE*", lcStr) ;  *******   
		  OR LIKE("*TC*",lcStr)
	        	 IF LIKE("RETEST", lcStr) ;
	        	 OR LIKE("*TC*", lcStr) ;
	        	 OR LIKE("*RETEST IFT*", lcStr) ;
        		 OR LIKE("*RETEST DIELECT*", lcStr) ;
        		 OR LIKE("*RETEST NN*", lcStr) ;
         		 OR LIKE("*THERMAL CLEAN*", lcStr)
	   	    	     REPLACE ss WITH "U"
		         ELSE
		        	 IF ThisForm.RecError("Standard Screen", lcStr, upsino)
		        	 	REPLACE ss WITH "??"
		        	 ELSE
		        	 	RETURN .F.
		        	 ENDIF
		         ENDIF
	       ELSE
        		IF LIKE("RT/DEHYDRATE", lcStr) OR LIKE("DEHYDRATE", lcStr) ********
                             REPLACE ss WITH "A"
	        	ELSE  
	        	      IF ThisForm.RecError("Standard Screen",lcStr,upsino)
	 	        		REPLACE ss WITH "??"
	        	      ELSE
	        		 RETURN .F.
       		              ENDIF
	        	ENDIF
	       ENDIF
       ENDIF
ENDIF
Elgin Rogers
Epic Solutions
www.epicsolutions.net
Next
Reply
Map
View

Click here to load this message in the networking platform