Open Form to a New Record in VBA
<p>My goal is to have all of the command buttons on my main menu open a form right to a new record for entry. However, I already have a code that works perfectly so all the forms open right to a new entry, and I can still navigate to previous entries. EXCEPT for one. I've double and triple checked this against the other codes, and there are no differences. For some reason though, this one form (I'm just going to call it "Form" for the purpose of this question) opens to the first record, rather than a new one. Below is the code I'm using that doesn't work, (even though it's the same as my other ones that do work.)</p>

<pre><code>Private Sub Command13_Click()
On Error GoTo Err_Command13_Click

   Dim stDocName As String
   Dim stLinkCriteria As String

   stDocName = "Form"
   DoCmd.OpenForm stDocName, , , stLinkCriteria
   DoCmd.GoToRecord , , acNewRec

Exit_Command13_Click:
   Exit Sub

Err_Command13_Click:
   MsgBox Err.Description
   Resume Exit_Command13_Click

End Sub
</code></pre>

<p>Surely this is a simple fix, but I'm at a loss.</p>