I have form that has two grids and in each I have inserted a checkbox. The check boxs expect an integer to be returned. The first grid displays without a problem, the second (when I change year) returns: Error with Column12-CurrentControl: Expression evaluated to an illegal value. I get the error on this line of code:
THISFORM.Mypageframe1.Page1.grdcust2.Column12.CURRENTCONTROL = 'chkImage'
The data is extracted from SQL Server with the same cursor name. The formats are slight differnt, the second cursor one less field, but in both cases the field the checkbox is tied to is numeric field. (Field 13 for the first cursor, field 12 for the second cursor). I have tried using a controlsource to identify each field on the grid and set the init of checkbox value to zero with same results.
I finally tested using a different cursor name for the second grid, that worked! Why? I delete the first cursor with this code USE IN (SELECT('custs')) and manually verified it does not exist before I create the second cursor.
I can use a unique cursor name for the second but it's used extensively in the module and I hoped to avoid that.
THISFORM.Mypageframe1.Page1.grdcust2.Column12.CURRENTCONTROL = 'chkImage'
The data is extracted from SQL Server with the same cursor name. The formats are slight differnt, the second cursor one less field, but in both cases the field the checkbox is tied to is numeric field. (Field 13 for the first cursor, field 12 for the second cursor). I have tried using a controlsource to identify each field on the grid and set the init of checkbox value to zero with same results.
I finally tested using a different cursor name for the second grid, that worked! Why? I delete the first cursor with this code USE IN (SELECT('custs')) and manually verified it does not exist before I create the second cursor.
I can use a unique cursor name for the second but it's used extensively in the module and I hoped to avoid that.