title: Codes does not work anymore after converting embedded macros to vba in ms access 2010
body: <p>I have converted an embedded macro to VBA in ms access 2010 and does not work at all. To give a conrete example. I made an <strong>Add Record</strong> button using the wizard and works perfectly but upon converting it into VBA by using the built in feature <strong>Convert Form's Macros to Visual Basic</strong> and the button won't do anything anymore. I actually don't know what I'm doing wrong as I am a newby in MS Access 2010. But i used to do this in MS Access 2007 and it's flawless.</p>
  
  <p>Can somebody give me an idea what's im doing wrong? Thanks in advance. </p>
  
  <p><strong>This is what the MS Access 2010 generated code after converting Macros to VBA</strong></p>
  
  <pre><code>Private Sub cmd_AddRecord_Click()
      On Error GoTo cmd_AddRecord_Click_Err
  
      On Error Resume Next
      DoCmd.GoToRecord , "", acNewRec
      If (MacroError &lt;&gt; 0) Then
          Beep
          MsgBox MacroError.Description, vbOKOnly, ""
      End If
  
      cmd_AddRecord_Click_Exit:
      Exit Sub
  
      cmd_AddRecord_Click_Err:
      MsgBox Error$
      Resume cmd_AddRecord_Click_Exit
  End Sub
  </code></pre>