I need to compare the data between two text boxes and a variable. If the value of the boxes don't match up and the variable is -1, I need to fail it.

When I do this:

VB.NET Code:
  1. If Not Me.txtPcidSystem.Text = Me.txtPcidDatabase.Text Then

I have no troubles, but adding the variable check produces a false positive.

VB.NET Code:
  1. If Not Me.txtPcidSystem.Text = Me.txtPcidDatabase.Text And TestData.BypassCheck_PCID = -1 Then

The way the code is laid out, I have to do this in one line. I can't check the first condition on one line and the second on another.

I've tried separating the data out with parantheses, but it's producing the same results.

Any ideas what I'm doing wrong here?