cancel
Showing results for 
Search instead for 
Did you mean: 

Clearing a comboBox

Former Member
0 Kudos

Hi ya'll.

(related to the SBO ver. 6.5)

I got this problem with a comboBox of mine.

I've filled it. Now when I change the forms Mode I want to clear it and reinstate some new values. These values will ofcourse be different than the first ones... But... It keeps the old value visible..

Here's what I do:

Sub EmptyAndInitCombo(ByVal f As SAPbouiCOM.Form, ByVal ComboName As String)

Dim c As SAPbouiCOM.ComboBox

Dim i As Int16

c = f.Items.Item(ComboName).Specific

If c.ValidValues.Count > 0 Then

For i = c.ValidValues.Count - 1 To 0 Step -1

c.ValidValues.Remove(i,SAPbouiCOM.BoSearchKey.psk_Index)

Next i

f.Items.Item(ComboName).Refresh()

End If

End Sub

The Refresh() doesnt seem to do anything... ??

TBR

Allan Rasmussen, Denmark

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Christian,

You also need to clear the datasource associated with the ComboBox e.g

DSComboBox.Value = "";

Regards, Lita

Former Member
0 Kudos

I havent added a datasource to my Combos.

All I need is to know how to empty it (well - I kinda already know that) - and clear the value..

So it's the clearing of the selected value that causes me problems...

Former Member
0 Kudos

HI all,

I have a basic proplem! I want to know if I can change the ITEMs in system forms' comboboxes(for example: summary type combobox in order form).

If it is possible please show me the way.

best regards.

Former Member
0 Kudos

HI all,

I have a basic proplem! I want to know if I can change the ITEMs in system forms' comboboxes(for example: summary type combobox in order form).

If it is possible please show me the way.

best regards.