title: compile error: expected end of statement
body: <p>A Microsoft Access 2010 database is giving me the following error message:  </p>
  
  <pre><code>Compile Error: Expected End Of Statement  
  </code></pre>
  
  <p>Here is the method that is throwing the error message:  </p>
  
  <pre><code>Private Sub Form_BeforeUpdate(Cancel As Integer)
      'Provide the user with the option to save/undo
      'changes made to the record in the form
      If MsgBox("Changes have been made to this record." _
          &amp; vbCrLf &amp; vbCrLf &amp; "Do you want to save these changes?" _
          , vbYesNo, "Changes Made...") = vbYes Then
              DoCmd.Save
          Else
              DoCmd.RunCommand acCmdUndo
      End If
  
      Dim sSQL As String
      sSQL = "SELECT max(Clients.ClientNumber) AS maxClientNumber FROM Clients"
      Dim rs As DAO Recordset
      Set rs = CurrentDb.OpenRecordset(sSQL)
      MsgBox ("Max client number is: " &amp; rs.Fields(1))
  End Sub  
  </code></pre>
  
  <p>The line of code that is throwing the error message is:  </p>
  
  <pre><code> Dim rs As DAO Recordset  
  </code></pre>
  
  <p>I am not sure if the problem has to do with the syntax of what is on the line preceding it.  Can anyone show how to fix this problem?  And explain what is going on?  </p>