>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...
>
Agnes found a typo in your RGB - it should be RGB(228,228,228). You don't need to put it in procedure or button - you need to do it only once in either grid or form's Init.
If you want ti verify the expression, then
lnColor = IIF(tPoDetail.solastwk=0,IIF(MOD(tPoDetail.nrowid,2)=0,RGB(228,228,228),RGB(255,255,255)),RGB(0,0,255))
=messagebox('Color on this row is ' + transform(lnColor))
If it's not broken, fix it until it is.
My Blog