>I am trying to get this to work. The syntax works in another form, but on this one I keep getting the message "Expression is invalid. Use a valid expression for DYNAMICBACKCOLOR property." The strange this is that if I step through it, I don't get the message, only when it just runs. This code is in the AfterRowColChange event. vSbvPromoDestinations is a view, if that makes a difference. I am trying this because I have a few grids on the form, on one tab I have two grids, the lower being dependent on the upper. When swithcing between them, when I move the record pointer on the upper grid, the view controlling the other grid is requeried and the grid refreshed, but the record marker doesn't move. So I thought I'd get rid of it and use this.
>
>
>WITH This
> .Tag = STR(RECNO('vSbvPromoDestinations'))
>
> .SetAll("DynamicBackColor", "IIF(RECNO('vSbvPromoDestinations') = VAL(ALLTRIM(.Tag)), ;
> RGB(255,255,128), RGB(255,255,255))", "Column")
>
> .Refresh()
>*.colAirportCode.DynamicBackColor = RGB(0,128,255)
>ENDWITH
>
>
>Please help, it's driving me nuts!
>
>Thanks,
>Dana
My guess is the missing "this"
WITH This
.Tag = STR(RECNO('vSbvPromoDestinations'))
.SetAll("DynamicBackColor", "IIF(RECNO('vSbvPromoDestinations') = VAL(ALLTRIM(this.Tag)), ;
RGB(255,255,128), RGB(255,255,255))", "Column")
.Refresh()
ENDWITH
You must remember that when the DynamicBackColor expression is evaluated, it is no longer in the "with this" environment, if you understaand what I mean.