on 12-04-2008 9:11 AM
Hi everyone,
I am trying to fill a combobox with valid values. Values are added ok, but a message is prompted, for a
specific value, that says Valid Value - Value does not Exist [66000-62] .
I have never seen such an error neither in the forum exists something similar. This is my code:
Dim cmb As SAPbouiCOM.ComboBox
cmb = oForm.Items.Item("CatCombo").Specific
While RS.EoF = False
If RS.Fields.Item("U_Description").Value.ToString.Length > 50 Then
descr = RS.Fields.Item("U_Description").Value.ToString.Substring(0, 50)
Else
descr = RS.Fields.Item("U_Description").Value.ToString
End If
Try
' Here is the error
cmb.ValidValues.Add(descr, RS.Fields.Item("U_FamCode").Value.ToString)
Catch ex As Exception
MsgBox(ex.Message)
End Try
RS.MoveNext()
End While
Regards,
Lena Apostolou
Edited by: Lena Apostolou on Dec 4, 2008 10:14 AM
Hi,
Yes i have checked the values and they are not null,they have the right values.
Regards,
Lena Apostolou
Edited by: Rui Pereira on Dec 23, 2008 4:14 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
When the exception is thrown, have you checked the values of
descr and RS.Fields.Item("U_FamCode").Value.ToString ?
Are any one of them being null?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
85 | |
7 | |
6 | |
4 | |
3 | |
3 | |
3 | |
3 | |
3 | |
2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.