title: Access Getting a value from the next record
body: <p>I have a database that tracks employee QA data. Here is a <a href="https://i.stack.imgur.com/DfTPw.jpg" rel="nofollow noreferrer">screenshot</a> of a query I have. The highlighted column indicates what type of QA each record is. What I want to do is change the type of form shown based on this value (its a lookup field so the value is actually numeric) Where I am having a problem is getting the value of the QAType field from the next record in the recordset of the query. Here is the code I am trying. </p>
  
  <pre><code>Private Sub Command55_Click()
  
  QAType = NextRecord.[QAType].Value
  
  Select Case QAType
  
      Case Is = 1
          DoCmd.OpenForm "frmRCRviewClaimEdits"
      Case Is = 2
          DoCmd.OpenForm "frmRCRviewCredits"
      Case Is = 3
          DoCmd.OpenForm "frmRCRviewFC"
      Case Is = 4
          DoCmd.OpenForm "frmRCRviewRegCall"
      Case Is = 5
          DoCmd.OpenForm "frmRCRviewRegDenials"
      Case Is = 6
          DoCmd.OpenForm "frmRCRviewRegWQ"
      Case Is = 7
          DoCmd.OpenForm "frmRCRviewRetro"
      Case Is = 8
          DoCmd.OpenForm "frmRCRviewRTE"
      Case Is = 9
          DoCmd.OpenForm "frmRCRviewStateInst"
      Case Is = 10
          DoCmd.OpenForm "frmRCRviewPC"
      Case Else
          MsgBox "The Next QA in the Query doesn't have a QA Type!"
  End Select
  End Sub
  </code></pre>
  
  <p>I hit an error trying the NextRecord statement which I kinda expected as I pulled it out of nowhere. Can anyone help me find a method that could accomplish this?</p>