Hi Edy,
I have also given a code to update the table after i change the values in the grid.
The green color highlighted line is not at all executing, when i debug and see it is showing "UNABLE TO EVALUATE THE EXPRESSION".
I have also attached the screen shots of my form.
In the first image, there is a grid in that the values changed must come and get updated in the next image matrix "Result" Column is my criteria.
Following is the code which i have given,
Case SAPbouiCOM.BoEventTypes.et_COMBO_SELECT
If pVal.ItemUID = "grid1" And pVal.BeforeAction = False Then
Dim oUserTable As SAPbobsCOM.UserTable
Dim strCode As String
Dim oTempRec As SAPbobsCOM.Recordset
oTempRec = objMain.objCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)
oUserTable = objMain.objCompany.UserTables.Item("EAHCM_JBP2")
oGrid = oForm.Items.Item("grid1").Specific
For intRow1 As Integer = 0 To oGrid.DataTable.Rows.Count - 1
strCode = oGrid.DataTable.GetValue("U_result", intRow1)
'If strCode <> "" Then
oUserTable.Code = strCode
' If oUserTable.GetByKey(strCode) Then
oUserTable.UserFields.Fields.Item("U_result").Value = oGrid.DataTable.GetValue("U_result", intRow1)
'End If
'End If
Next
oTempRec.DoQuery("Update [@EAHCM_JBP2] set U_result=U_result")
End If
And check out the attachments.
Regards,
Jananisuba S