I am iterating through a series of data and putting them into variables
I am then testing these string variables and trying to have a hit counter count them up:
Let's say ccMonthDecrypted does = "January" and I have actually "put" this result into a field just to ensure I am not whacked out of my mind.
So the following code should get a HIT when a particular month is equal to ccMonthDecrypted (the decrypted results of this variable are indeed January through December and all are spelled 100% and they all start with a capital letter, etc. Nothing is wrong with the encrypt/decrypt and nothing is weird about the data itself.)
All variables have been declared with a local variable (local varJanCount) and all variables contain a 0 (put 0 into varJanCount)
YET....
Code: Select all
if ccMonthDecrypted = "January" then
add 1 to varJanCount
else
if ccMonthDecrypted = "February" then
add 1 to varFebCount
else
if ccMonthDecrypted = "March" then
add 1 to varMarCount
else
if ccMonthDecrypted = "April" then
add 1 to varAprCount
else
if ccMonthDecrypted = "May" then
add 1 to varMayCount
else
if ccMonthDecrypted = "June" then
add 1 to varJunCount
else
if ccMonthDecrypted = "July" then
add 1 to varJulCount
else
if ccMonthDecrypted = "August" then
add 1 to varAugCount
else
if ccMonthDecrypted = "September" then
add 1 to varSepCount
else
if ccMonthDecrypted = "October" then
add 1 to varOctCount
else
if ccMonthDecrypted = "November" then
add 1 to varNovCount
else
if ccMonthDecrypted = "December" then
add 1 to varDecCount
end if
end if
end if
end if
end if
end if
end if
end if
end if
end if
end if
end if
Code: Select all
put "January" & tab & varJanCount & cr &\
"February" & tab & varFebCount & cr &\
"March" & tab & varMarCount & cr &\
"April" & tab & varAprCount & cr &\
"May" & tab & varMayCount & cr &\
"June" & tab & varJunCount & cr &\
"July" & tab & varJulCount & cr &\
"August" & tab & varAugCount & cr &\
"September" & tab & varSepCount & cr &\
"October" & tab & varOctCount & cr &\
"November" & tab & varNovCount & cr &\
"December" & tab & varDecCount into line 2 of field "tblAcctsMonth"
getting any hits.
If read in english, it looks like this:
if "January" = "January" then
add 1 to varJanCount
end if
That should work when I hit a January.
It's not.
It makes no sense.
What am I doing wrong?
Mike