General information
Category:
Forms & Form designer
I had a similar problem with it working on some computers and not others. Someone suggested getting rid of the setall. That seems to have worked, though I have not tested it extensively. You can loop through the columns instead of the setall.
-Michelle
>Greetings All,
>
>I have an app that has a multipurpose grid based on user selections.
>In the refresh event of the grid I have the following code.
>
>if inlist(alltrim(upper(thisform.grid1.recordsource)),"WKSTTEMP", "WKDPTEMP")
>thisform.grid1.setall("DynamicBackColor", "iif(thisform.grid1.column1.text1.value = 9,RGB(0,0,255),RGB(255,255,255))","Column")
>
>thisform.grid1.setall("DynamicForeColor",
>"iif(thisform.grid1.column1.text1.value = 9,RGB(255,255,255),RGB(0,0,0))","Column")
>else
> thisform.grid1.setall("DynamicBackColor","RGB(255,255,255)","Column")
>thisform.grid1.setall("DynamicForeColor","RGB(0,0,0)","Column")
>endif
>
>In general, this code looks at the value in column 1 and if it is a 9 then it highlites the entire row. The code works great the first time the user selects this option. The problem occurs when the user selects the same option but with a different department. When the grid is being refreshed I get the following errors:
>
>Expression is invalid, use a valid expression for DynamicBackColor
>Expression is invalid, use a valid expression for DynamicForeColor
>
>I have also tried placing the code in another method I created, but I still get this error and it repeats for the number of records in the grid.
>
>Thanks in Advance.
>
>Scott
Previous
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