Skip to Content
0
Former Member
Feb 26, 2009 at 08:35 AM

value is not showing in edit box?

28 Views

hi expert all

at first see my code.

i have two type of vehicle own vehicle, hire vehicle. when vehicle no is true then vehicle type edit box it will show "own vehicle" other wise 'hire vehicle'.......

my problem is that in vehicle type edit box that value is not showing?.

If (pVal.ItemUID = "FBtn") And (pVal.EventType = SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED) Then

Dim oEdit As SAPbouiCOM.EditText

Dim strFind As String

Dim str As String

Dim TEST As String

oItem = oForm.Items.Item("vVal")

oEdit = oItem.Specific

strFind = oEdit.String

Try

' SBO_Application.MessageBox("15")

If strFind = "" Then

SBO_Application.MessageBox("PLEASE ENTER THE VEHICLE NO", MsgBoxStyle.Exclamation, )

Else

str = oForm.Items.Item("vVal").Specific.value()

TEST = FIND(strFind)

If TEST = True Then

oForm.Items.Item("vVal").Specific.value()

oForm.Items.Item("VtyVal").Specific.value() = "OWN VEHICLE" ''''''''''''' this will not showing ''''''''vehicle type edit box

Else

'oForm.Items.Item("VtyVal").Specific.value() = "HIRE VEHICLE" ''''''''''''''' rthis will not showing ''''vehicle type edit box

SBO_Application.MessageBox("WRONG VEHICLE NO", MsgBoxStyle.Exclamation, )

End If

End If

RefreshForm()

Catch ex As Exception

SBO_Application.MessageBox(ex.Message)

End Try

End If

Private Function FIND(ByVal Veicleno As String) As Boolean

Dim RS As SAPbobsCOM.Recordset

Dim Bob As SAPbobsCOM.SBObob

' Dim z As String

Try

Bob = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoBridge)

RS = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset)

RS.DoQuery("SELECT Name FROM [@VNO] WHERE Name ='" & Veicleno & "' ")

RS.MoveFirst()

Do While Not RS.EoF

Veicleno = RS.Fields.Item("Name").Value

Return True

Loop

Catch ex As Exception

MessageBox.Show(ex.Message)

Return False

End Try

End Function