Question
ASP loop brain freexe
Hi,
I've got a bit of brain freeze with the following:
looping through a tbl which holds an ID value and a secondary value for each unique ID.
I need to set a value (CELLCOLOR) to be true if the secondary value is the same as::
at the min lets say I have four IDs:
101 - 10
102 - 20
103 - 20
104 - 30
ok what I need to happen is with the cellcolor value is (show in brackets):
101 - 10 ()
102 - 20 (YELLOW)
103 - 20 (YELLOW)
104 - 30 ()
Because 102 and 103 have the same value BOTH of those need to be set to yellow.
However my code only works for one ...
first I set the secondary value
then I check if that is the same as the previous - if yes then ceLLcolor is set.. is not leave it blank.
The problem is.. although that would work for record 103,.. it wouldn't work for 102 as it's previous is different,.. but I need it not to see that..
I've tried working it out based on the checking agianst the nextrecord and the previous but my code became too complicated...
I know this is simple, but my brain's fallen asleep - any ideas anyone?
Cheers
I've got a bit of brain freeze with the following:
looping through a tbl which holds an ID value and a secondary value for each unique ID.
I need to set a value (CELLCOLOR) to be true if the secondary value is the same as::
at the min lets say I have four IDs:
101 - 10
102 - 20
103 - 20
104 - 30
ok what I need to happen is with the cellcolor value is (show in brackets):
101 - 10 ()
102 - 20 (YELLOW)
103 - 20 (YELLOW)
104 - 30 ()
Because 102 and 103 have the same value BOTH of those need to be set to yellow.
However my code only works for one ...
first I set the secondary value
then I check if that is the same as the previous - if yes then ceLLcolor is set.. is not leave it blank.
The problem is.. although that would work for record 103,.. it wouldn't work for 102 as it's previous is different,.. but I need it not to see that..
I've tried working it out based on the checking agianst the nextrecord and the previous but my code became too complicated...
I know this is simple, but my brain's fallen asleep - any ideas anyone?
Cheers
