cancel
Showing results for 
Search instead for 
Did you mean: 

UI- Link a table column to an EditText

Former Member
0 Kudos

Hi, I am trying to bind a Column of a table to an EditText, but I find an error '-7005(ffffe4a3)'

Data Source-Invalid table name,The version is SDk 6.5.

This is the code:

Private Function CreateMySimpleForm()

Dim oItem As SAPbouiCOM.Item

Dim oButton As SAPbouiCOM.Button

Dim oStaticText As SAPbouiCOM.StaticText

Dim oEditText As SAPbouiCOM.EditText

Dim oComboBox As SAPbouiCOM.ComboBox

Set oItem = oForm.Items.Add("EditText1", it_EDIT)

oItem.Left = 157

oItem.Width = 163

oItem.Top = 8

oItem.Height = 14

Set oEditText = oItem.Specific

'// bind the text edit item to the defined used data source

oEditText.DataBind.SetBound True, "OCRD", "CardCode"

Set oItem = oForm.Items.Add("StaticTxt1", it_STATIC)

oItem.Left = 7

oItem.Width = 148

oItem.Top = 8

oItem.Height = 14

oItem.LinkTo = "EditText1"

Set oStaticText = oItem.Specific

oStaticText.Caption = "Proveedor"

EndFunction

Accepted Solutions (0)

Answers (2)

Answers (2)

Former Member
0 Kudos

Hi, Natalia

You have to define a datasource(DBDataSource or UserDataSource). Then you can bind your text box to this datasource. See it in help and samples.

Regards,

Mark

Former Member
0 Kudos

I guess you need to add the datasource before using it.

'Add a ds

dsOCRD = YourForm.DataSources.DBDataSources.Add("OCRD")

'fill datasource with actual data

dsOCRD.Query()

HTH Lutz Morrien