forum

Home / DeveloperSection / Forums / IF/ELSE Statement doesn't work

IF/ELSE Statement doesn't work

Anonymous User 2468 11-Jun-2013
Hi Expert, 

I have a ComboBox containing 5 values. An empty line, "Credit", "Debit", "Credit Settlement", and "Debit Settlement". I am trying to perform an error validation on it. If the user types anything in the ComboBox or if the selection of the empty string is made, I want to trigger an error. This is what I have now but it doesn't work. Any ideas?

If cboTypeRes.Text.Trim = "" or cboTypeRes.Text.Trim <> "Debit" Or cboTypeRes.Text.Trim <> "Credit" Or cboTypeRes.Text.Trim = "Debit Settlement" Or 

cboTypeRes.Text.Trim = "Credit Settlement" Then

Thanks in advance for any recommendations or solutions.


Updated on 12-Jun-2013
I am a content writter !

Can you answer this question?


Answer

1 Answers

Liked By