Skip to Content
0
Former Member
Feb 23, 2009 at 09:20 AM

Error return code "-2035"

314 Views

I have created a simple master form.

The first time I tried to enter some data and save it, i was able to do so.

But thereafter, I get an error code of "-2035" everytime I try to add data to this form.

I have pasted part of the data addition code -

oItem = oForm.Items.Item("cmbPkgName")
                                    cmbEdit = oItem.Specific
                                    strFind = cmbEdit.Selected.Value

                                    oItem = oForm.Items.Item("txtSPQ")
                                    oEdit = oItem.Specific
                                    SPQ = oEdit.String

                                    oItem = oForm.Items.Item("txtGrossWt")
                                    oEdit = oItem.Specific
                                    GrossWt = oEdit.String

                                    oItem = oForm.Items.Item("txtLength")
                                    oEdit = oItem.Specific
                                    Length = oEdit.String

                                    oItem = oForm.Items.Item("txtWidth")
                                    oEdit = oItem.Specific
                                    Width = oEdit.String

                                    oItem = oForm.Items.Item("txtHeight")
                                    oEdit = oItem.Specific
                                    Height = oEdit.String

                                    oItem = oForm.Items.Item("txtCESS")
                                    oEdit = oItem.Specific
                                    CESS = oEdit.String

                                    Dim oUsrTbl As SAPbobsCOM.UserTable
                                    oUsrTbl = oCom.UserTables.Item("TPKCG")

                                    oUsrTbl.Code = strFind
                                    oUsrTbl.Name = "Name"

                                    oUsrTbl.UserFields.Fields.Item("U_SPQ").Value = SPQ
                                    oUsrTbl.UserFields.Fields.Item("U_GWt").Value = GrossWt
                                    oUsrTbl.UserFields.Fields.Item("U_Length").Value = Length
                                    oUsrTbl.UserFields.Fields.Item("U_Width").Value = Width
                                    oUsrTbl.UserFields.Fields.Item("U_Height").Value = Height
                                    oUsrTbl.UserFields.Fields.Item("U_CESS").Value = CESS

                                    'oUsrTbl.Add()
                                    Dim Res As Integer
                                    Res = oUsrTbl.Add()

                                    If Res = 0 Then
                                        SBO_Application.MessageBox("Package added.")
                                        'oForm.Close()
                                    Else
                                        SBO_Application.MessageBox(Res.ToString)
                                    End If

Please advise.