I'm doing a validation statement to be sure that a couple of text boxes and list boxes and not null before continuing. This is my code:
If (txtitn.Text = vbNullString) And (lststate.ListIndex = False) And (txtowner.Text = vbNullString) And (lstteam.ListIndex = False) Then
MsgBox ("You must enter a search criteria!"
txtitn.SetFocus
Exit Sub
The problem is if the very first item in either list box is selected, it is still seing the list box as null and it returns the message. Any ideas? Thanks!
If (txtitn.Text = vbNullString) And (lststate.ListIndex = False) And (txtowner.Text = vbNullString) And (lstteam.ListIndex = False) Then
MsgBox ("You must enter a search criteria!"
txtitn.SetFocus
Exit Sub
The problem is if the very first item in either list box is selected, it is still seing the list box as null and it returns the message. Any ideas? Thanks!