General information
Category:
Coding, syntax & commands
>>I'm trying to utilize the .DynamicFore (and Back) Color properties of a grid. If my IIF statement contains the RGB() funtion, things work fine. Example: IIF(something = something, RGB(255,255,255), RGB(0,0,0))
>>
>>I'd like to make it more generic by using a variable to enter the coloring but I always get an "Invalid expression in the Dynamic...."
>>The variable is a property of the grid and the something = something is properly evaluated as they are properties of the grid too.
>>
>>THIS.gnForeColor = some valid color value
>>
>>Example: IIF(something = something, THIS.gnForeColor, ........
>>
>These variables seem to need a wider scope...try it as a form property.
Hi Bruce,
I'll give that a try but why would the evaluated expression understand "THIS" being in the grid but not the color properties? IIF(RECNO(THIS.RecordSource) = THIS.gnLastRec, color, color) - The statement understands THIS.RecordSource and THIS.gnLastRec just fine, it just doesn't do the colors unless I have the RGB funtion included.
Steve
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only