Hi Paul
#1 check UT help for the use of the pre tag, that will make your message more readable.
#2your code is
thisform.bASGRID1.Column7.DynamicForeColor=[IIF(tPoDetail.solastwk=0,IIF(MOD(tPoDetail.nrowid,2)=0,RGB(228,228,288),RGB(255,255,255)),RGB(0,0,255))]
I recomend ICASE instead IIF this reduses the number of brackets
THISFORM.bASGRID1.Column7.DYNAMICFORECOLOR=;
[ICASE(tPoDetail.solastwk#0,RGB(0,0,255),]+;
[MOD(tPoDetail.nrowid,2)=0,RGB(228,228,288),]+;
[RGB(255,255,255))]
so now instantiate your form suspend and run the expression (mine or yours) in command window
?ICASE(tPoDetail.solastwk#0,RGB(0,0,255),[MOD(tPoDetail.nrowid,2)=0,RGB(228,228,228),RGB(255,255,255))
Does this run without error? is the result as expected?
#3
RGB(228,228,288)
is invalid
#4 to speed up the expression, use the interger representation of your color
THISFORM.bASGRID1.Column7.DYNAMICFORECOLOR=;
[ICASE(tPoDetail.solastwk#0,16711680,]+;
[MOD(tPoDetail.nrowid,2)=0,15000804,]+;
[16777215)]
HTH
Agnes
>I was very curios so what i did was i put in a button procedure. and then i would reverse its effect on the next click, however, on click i get an error message, something wrong with the code below?
>
>error:
>Expression is invalid,
>
>btw. so you mean i can call the same proc over and over again?
>
>thisform.bASGRID1.Column7.DynamicForeColor=[IIF(tPoDetail.solastwk=0,IIF(MOD(tPoDetail.nrowid,2)=0,RGB(228,228,288),RGB(255,255,255)),RGB(0,0,255))]
>
>thanks in advance...
>
Words are given to man to enable him to conceal his true feelings.
Charles Maurice de Talleyrand-Périgord
Weeks of programming can save you hours of planning.
OffThere is no place like [::1]