title: the user must match to the 3 fields
body: <pre><code>Dim elem As String
  elem = "Grade School"
  Dim v As Integer
  v = 0
  Dim con As New SqlConnection("SERVER=ANINGDZTS-PC;DATABASE=AEVS;Trusted_Connection = yes;")
  Dim cmd As SqlCommand = New SqlCommand("SELECT * FROM tbl_Voter WHERE Department, VotersID  = '" &amp; elem &amp; "''" &amp; txt_PwordElem.Text &amp; "'AND Voted ='" &amp; v &amp; "'", con)
  
  con.Open()
  Dim sdr As SqlDataReader = cmd.ExecuteReader()
  
  Try
      If (sdr.Read() = False) Then
          high()
      Else
          MessageBox.Show("WELCOME!")
          elemBallot.Show()
          Me.Hide()
      End If
  Catch EX As Exception
      MsgBox(EX.Message)
  End Try
  
  End Sub
  </code></pre>
  
  <p>this code is not working, an error appear," An expression of non-boolean type specified in a context where a condition is expected, near ','."</p>