Skip to Content
0
Former Member
Nov 30, 2009 at 07:58 AM

Form Load Problem

39 Views

Hi Experts

I have create a form using Screen Painter. I am accessing this form by code. but at the load time it is show error "Invalid Query Tree [300-33] SQL Error is 8180"

My code for accessing form is given below

Public Overridable Sub OnAfterMenuClick(ByVal pVal As MenuEvent)

Dim XMLDOCMENT As Xml.XmlDocument

Dim item As Item

Dim cmbWhse As ComboBox

Dim form As Form

Dim oMatrix As Matrix

Dim oRecordset As Recordset

Dim strSql As String

Dim btnUpdate As Button

Try

form = B1Connections.theAppl.Forms.Item("frmZones")

form.Select()

Catch ex As Exception

XMLDOCMENT = New Xml.XmlDocument

XMLDOCMENT.Load("Zone.srf")

B1Connections.theAppl.LoadBatchActions(XMLDOCMENT.InnerXml)

strSql = "select WhsCode, whsname from owhs"

oRecordset = B1Connections.diCompany.GetBusinessObject(BoObjectTypes.BoRecordset)

oRecordset.DoQuery(strSql)

form = B1Connections.theAppl.Forms.ActiveForm

item = form.Items.Item("M001")

oMatrix = item.Specific

item = form.Items.Item("3")

cmbWhse = item.Specific

'cmbWhse.DataBind.SetBound("true", "", "Whse")

While oRecordset.EoF = False

cmbWhse.ValidValues.Add(oRecordset.Fields.Item(0).Value, oRecordset.Fields.Item(1).Value)

oRecordset.MoveNext()

End While

'oForm = B1Connections.theAppl.Forms.Item("frmShelfMaster")

item = form.Items.Item("B002")

item.Enabled = False

btnUpdate = item.Specific

item = form.Items.Item("B003")

item.Enabled = False

item = form.Items.Item("8")

item.Enabled = False

End Try

End Sub

It gives the error on " B1Connections.theAppl.LoadBatchActions(XMLDOCMENT.InnerXml)" Code . Please guide me

Thanks