You can set it to a method call.
Say you want it a different color for different days of the week,
the method:
LParameters tcDay
Do Case
Case tcDay = "Sunday"
lnRetVal = RGB(255,255,0)
Case tcDay = "Friday"
lnRetVal = RGB(0,0,255)
Case tcDay = "Monday"
lnRetVal= RGB(0,255,255)
Case tcDay = "Thursday"
lnRetVal = RGB(0,255,0)
Otherwise
lnRetVal = RGB(255,255,255)
EndCase
Return lnRetVal
To set it:
this.SetAll("DynamicBackColor", "thisform.GridColor(dates.cday)")
then something similar for the fore colors...
HTH
>Help....
>
>I have been tring to create a grid that will change foreground and backcolors of the fields based on the data in thw database. I have tried using IIf statements and they work if I want only 2 color options, I am tring to get a total of 4 color options for each the foreground and the background.
>
>I have tried using case statements but then the grid does nothing.
>
>Any ideas??????
>
>Rich
Insanity: Doing the same thing over and over and expecting different results.