Skip to Content
avatar image
Former Member

delete row of system matrix on form load

Hello I need delete some rows from a system matrix, the problem that I have it's when I instance the matrix into my variable this stops there and the code not continues, I don't know why. this is my code. the code stops on this line oMatrix = oForm.Items.Item(13).Specific

 Private Sub SBO_Application_ItemEvent(FormUID As String, ByRef pVal As ItemEvent, ByRef BubbleEvent As Boolean) Handles SBO_Application.ItemEvent
        BubbleEvent = True
        If pVal.FormTypeEx = "65213" Then
            If pVal.EventType = BoEventTypes.et_FORM_LOAD And pVal.BeforeAction = False Then
                Dim oMatrix As SAPbouiCOM.Matrix
                Dim oProd As String
                oForm = SBO_Application.Forms.GetFormByTypeAndCount(pVal.FormType, pVal.FormTypeCount)
                oMatrix = oForm.Items.Item(13).Specific
                For i = 0 To oMatrix.RowCount - 1
                    oProd = oMatrix.Columns.Item("ItemCode").specific.value
                Next
            End If
            If pVal.EventType = BoEventTypes.et_FORM_CLOSE And pVal.BeforeAction = False Then
                oForm = Nothing
            End If
        End If
    End Sub
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Nov 11, 2016 at 03:12 PM

    Hi Werner,

    Try this:

    oMatrix = oForm.Items.Item("13").Specific

    Kind Regards,

    Diego Lother

    Add comment
    10|10000 characters needed characters exceeded