>I worked on this program (automation) last night and already this morning and here is the code I have so far. There is other code after the ENDFOR that I am not posting. I modified the code to work with 12 tables versus cursors. I converted the cursors to Tables last night in order to minimize the processing for testing purposes only. When the program is finished it will process the data into 12 cursors, each representing a month's financial data of a certain year. My concern is that the IF statement is not working. It is:
>
>IF ALLTRIM(lcCarr_Name) != lcOldCarr_Name
>
>This statement shows up as a value of FALSE, but it should come out as TRUE, since the Carrier Name of "ACE" does not equal lcOldCarr_Name which holds a blank, as in "".
>
You need to review how VFP does comparisons on strings of unequal length, especially with SET EXACT OFF. The comparison is made up to the length of the RightHand Arguement (RHA). IF RHA is an empty string (LEN = 0 rather than all blanks) the comparison always is true.
xx = "abcd"
yy = ""
? xx = yy
yy = "a"
? xx = yy
yy = "ab"
? xx = yy
If you need to work with SET EXACT OFF then you need to take special care.
xx = "Anything"
yy = ""
? xx != yy
? NOT xx == yy