title: How to go to next record in MS Access
body: <p>I am new in MS access 2007 programming..
  I want to get information from database one by one.But the code which i am using is not executing that. If I am on first record then it directly goes to last record which i dont want. I want to take it to the next record..
  Here is my code:</p>
  
  <pre><code>Private Sub MoveNextBttn_Click()
      Dim db As Database
      Set db = CurrentDb
      Dim str As String
      str = "SELECT * FROM Table_Emp_Info"
      Dim rst As Recordset
      Set rst = db.OpenRecordset(str)
      Dim xxx As Integer
      xxx = 1
  
      'If the recordset is empty, exit.
      If rst.EOF Then
         Exit Sub
      End If
  
      Do Until rst.EOF
          Emp_ID_Text.Value = rst.Fields("EmpID")
          Rowsource_Designation.Value = rst.Fields("Designation")
          RowSource_Dept.Value = rst.Fields("Dept")
          DOJ_Text.Value = rst.Fields("Date_Of_Joining")
          rst.MoveNext
           'xxx = xxx + 1
      Loop
  
      rst.Close
  
  End Sub
  </code></pre>