This topic is locked
[SOLVED]

 Change Display Color

12/15/2010 9:56:30 PM
ASPRunnerPro General questions
A
andie.caron author

Good day to all. I have a bit of a weird one. On a list page, I have this code to change the font color given a certain situation:
if ucase(rs("initial_status")) = "A" then

strValue = "<font color=blue>" & strValue & "</font>"

elseif ucase(rs("initial_status")) = "C" then

strValue = "<font color=green>" & strValue & "</font>"

else

strValue = "<font color=brown>" & strValue & "</font>"

end if
I've tried using the RecordSet notation as well as strValue. Now here is the weird part, on another list page I have the same type of field (nvarchar(1)) with this exact code and it works. I've checked my table and the data in the tables is either "C", "A" or something else.
Hmmm, am I not seeing something with this code with these old eyes???

Sergey Kornilov admin 12/15/2010

Code looks good. I would check if field name spelled right (case-sensitive).
You can also post your application to Demo Account and open a ticket at http://support.xlinesoft.com sending your Demo Account URL. 'Demo Account' button can be found on the last screen in the program.

A
andie.caron author 12/16/2010



Code looks good. I would check if field name spelled right (case-sensitive).
You can also post your application to Demo Account and open a ticket at http://support.xlinesoft.com sending your Demo Account URL. 'Demo Account' button can be found on the last screen in the program.


Problem solved, it seems that there was a space after the data in some of the records, the clue was that some of the records dsiplayed properly (if we paged thru enuff records). Used the TRIM function and voila.
Sorry folks, should have done a little more digging. However I do have another post following this one, hopefully that someone can help with.
Not related to this one.
Cheers.