Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Form - Bad Value error for Edit Text box

Hi,

I have a custom form with a textbox (SBO EditText control) on it. When I try to set the value to the EditText box I keep getting the "Form - Bad Value" error message. If I set the Editable property of the textbox to false then it works fine, which is weird. The code I'm using to the set the value is:

((SAPbouiCOM.EditText) aItem.Specific).String = aText;

"aText" is a string variable with a valid value. Using the debugger I've also made sure that "aItem" object is not null and actually has a reference to the EditText box on the form.

Any clue guys? Thanks in advance!

replied

HI Nick Rice

There is two ways to set the value. One your way, then through the datasource.

Your way can not be used with the choosefromlist object, must use datasource in that instance to update edittext. If you do it your way in vb.net it would look like.

Dim edittext as SAPbouiCOM.EditText

edittext=oform.items.item("EditBoxID").specific

edittext.value=cstr("String Value")

Hope this helps

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question