title: The 'If' statement part is not being carried out
body: <p>I'm currently working on a project for school and it includes a login and register system.</p>
  
  <p>This is a function that I have made. The "taken" variable will be passed back to the main program.</p>
  
  <pre><code>Dim taken As Boolean
  Dim temp As String
  For counter = 1 To totalrecords
      FileGet(1, player_info)
      temp = player_info.username
      If TextBox2.Text = temp Then 
        msgbox("this is a messagebox")
        taken = True
      End If
  Next
  </code></pre>
  
  <p>This is the part of the code that checks if any usernames are in use. If so, taken = true and then a message is displayed.</p>
  
  <p>Now, for some reason the if statement part is not being carried out. The message box does not show at all. I have tested this by using more than one same username and the second (same) username is still added to the file. I'm very confused.</p>
  
  <p>Part I believe is not working  -  </p>
  
  <pre><code>If TextBox2.Text = temp Then 
      taken = True
  End If
  </code></pre>