I heard VB gets confused with multiple logical operators at once, so I’m stuck here. I have 3 textboxes and I want to check if any of them is empty.
This simple If did not work:
If txt1.Text = "" Or txt2.Text = "" Or txt3.Text = "" Then -Something-
However it works if I only put two of them to compare.
Thanks for your answers.
The code above should work but check for null or empty string with
String.IsNullOrEmpty is more elegant:
PD: If you use several “OR”, all the conditionals will be checked.
If you use OrElse, it will check the conditionals in order and when one it’s not true
the next conditional statements will not be checked