Skip to Content
0
Former Member
May 27, 2008 at 07:46 AM

Mandatory field in Matrix for Combo

22 Views

Hi All,

I wrote a code for not allowing null value for combo box in matrix. The code follows but if i add the record its accepting the null values plz correct me where i go wrong

Dim a As Integer

Dim oCombo As SAPbouiCOM.ComboBox

For a = 1 To oMatrix.RowCount()

oCombo = oMatrix.Columns.Item("txtcatcode").Cells.Item(a).Specific

If oCombo.Selected Is Nothing Then

BubbleEvent = False

oCombo.Active = True

SBO_Application.SetStatusBarMessage("Category Code should not be left blank")

Else

If oCombo.Selected.Value Is "" Then

BubbleEvent = False

oCombo.Active = True

SBO_Application.SetStatusBarMessage("Category Code should not be left blank")

End If

End If

Next a