cancel
Showing results for 
Search instead for 
Did you mean: 

Form - Bad Value error for Edit Text box

Former Member
0 Kudos

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!

Accepted Solutions (1)

Accepted Solutions (1)

former_member184566
Active Contributor
0 Kudos

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

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello,

I had this error one time. The problem was about the event handler. I had a function that to set the value to a text box, and I had an other function that was seting the BubbleEvent to false on the et_validate event.

Maybe you have a similar problem.

Sebastien