title: Inline SQL statement returning only duplicate first record in recordset
body: <p>I have a table named Employees with a field named EmployeeID. In a separate table, I have a separate master table of employees named Master with a field named EmployeeStatus. I am trying to validate all employees who have been terminated from the company are not listed in the Employees table.</p>
  
  <p>However, current code I am using below is returning duplicate of the first record in the master table of employees. The value of record count property of the recordset object matches what I expect, the total number of terminated employees. <strong>rs.Fields(0) however only displays duplicate of the first matching record in the Master table.</strong> as seen from debug.print in the immediate window. I have already check for the following:</p>
  
  <ul>
  <li>Trailing and leading spaces in field names</li>
  <li>Proper quoting of strings</li>
  <li>SQL and VBA syntax</li>
  </ul>
  
  <p><strong>How can I fix my code to display all matching records?</strong></p>
  
  <pre><code>Public Function validEmployee(EmpID as String)
  
  Dim dbs As DAO.database
  Dim rs As DAO.recordset
  Dim sqlString as String
  set dbs = CurrentDb
  
  sqlString = "SELECT [EmployeeID] FROM [MASTER] WHERE [EmployeeStatus] = 'Terminated'"
  
  set rs = dbs.openrecordset(sqlString)
  rs.moveLast
  debug.print rs.recordcount
  debug.print rs.fields(0)
  </code></pre>