Skip to Content
0
Former Member
May 28, 2008 at 02:05 PM

Reference to object instance is not established as an object

28 Views

Hey guys....

I'm using SAP B1 2005 A and i've created a matrix that fills with information obtained by 2 textboxes and also a combobox.

The problem is that in the exact moment that I choose some value in the combo box in order to obtain all the data to fill the grid the error "Reference to object instance is not established as an object" appears.

I checked everything also the information in the db and the creation of the objects....and it seems to be fine. Here it goes in order to get some answer.....thank you

Dim ocbx As SAPbouiCOM.ComboBox

Dim ocbx2 As SAPbouiCOM.ComboBox

Dim ocols As SAPbouiCOM.Columns

Dim oitems As SAPbobsCOM.Items =

oCompany.GetBusinessObject(BoObjectTypes.oItems)

Dim oForm As SAPbouiCOM.Form = Pappl.Forms.Item("CMP_FRM_PROP")

oCbx = oForm.Items.Item("CMB_UTIL").Specific

ocbx2 = oForm.Items.Item("CMB_REDO").Specific

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

ocols = oMatrix.Columns

For i As Integer = 1 To oMatrix.RowCount

If oCbx.Selected.Value <> "" Then

ocols.Item("CMP_RO5").Cells.Item(i).Specific.string = oCbx.Selected.Value

Greetings

PD: The error makes a break exactly here---> If oCbx.Selected.Value <> ""