title: Microsoft Access is inserting wrong values in table
body: <p>I am fairly new at Microsoft Access and I came upon a error which I can't seem to resolve. I create 2 seperate form which are LOGIN and LOGOUT, which essentially will handle all the employee interactions throughout the day with basic functionality.</p>
  
  <p><img src="https://i.stack.imgur.com/EIOfm.png" alt="Relationship"></p>
  
  <p><img src="https://i.stack.imgur.com/Gp5Ig.png" alt="Login form"></p>
  
  <p>Incase you needed to see my relationships or login form to get a idea of what I am doing.</p>
  
  <p>My login button on click</p>
  
  <pre class="lang-vb prettyprint-override"><code>Private Sub cmdLogin_Click()
      'add record to database
      Dim empID As Integer
      Dim logDate As Date
      Dim logTime As String
      logTime = Time
      logDate = Date
      empID = Me.cboEmployeeNo.Column(0)
  
      CurrentDb.Execute "INSERT INTO tbl_workShift(employeeID, logTypeID, logDate, logTime) " &amp; _
       " Values(" &amp; empID &amp; ", 1, #" &amp; logDate &amp; "#, '" &amp; logTime &amp; "')"
  End Sub
  </code></pre>
  
  <p>My problem is whenever I login or logout with a employee it seem to create a duplicate of somekind with a different employee number but same first and last name.</p>
  
  <p><img src="https://i.stack.imgur.com/W00kY.png" alt="enter image description here"></p>
  
  <p>As you can see, employee ID 38 and 40 should not exist, but they were duplicated from 2 and 4? any reason why this is happening? any help will be appreciated</p>