Hi Mohamed and Pedro,
Thank you both for your help.
I have found the solution to my problem by using BOTH your suggestions.
The problem was in the Combo. I assumed its value was BLANK i.e "".
I forgot that it could also be a NULL.
Also, I checked the value of the USERDATASOURCE instead of the value of the COMBO.
I don't know why UDS works, but VALUE does not in my project. Maybe someone can explain?
Here is my final solution- which works!
Best Regards,
Leon
PrivateSubOnBeforeB_OKPressed(ByValSource AsObject, ByValpVal AsSAPbouiCOM.SBOItemEventArg, ByRefBubble AsBoolean)
IfO_CrRq.Selected = TrueAndO_ToShp.Selected = TrueThen
‘// IfC_ToShip.Value <> ""Then
If Not String.IsNullOrEmpty(FormSelx.DataSources.UserDataSources.Item(“UDS_Combo”).Value Then
SBO_Application.MessageBox("OK You have selected a ship! ")
Else
SBO_Application.MessageBox("Error! You have not selected a ship!")
EndIf
EndIf