MS Access OpenForm was cancelled - error 2501
<p>I've been asked to make some modification to Forms in an Access database used by a group I work with.  I had to add a data entry form similar to one that exists so I copied one of the existing forms and made some modifications.  When I click the button to open the form to test it I get this error:</p>

<p>Run-time error '2501'
The OpenForm action was cancelled.</p>

<p>Here is the code that is called to cause this error:</p>

<pre><code>Private Sub cmdCPE_EntryForm_Click()
On Error GoTo Err_cmdCPE_EntryForm_Click

    Dim stDocName As String
    Dim stLinkCriteria As String

    stDocName = "CPE_EntryForm"
    DoCmd.OpenForm stDocName ', , , stLinkCriteria

Exit_cmdCPE_EntryForm_Click:
    Exit Sub

Err_cmdCPE_EntryForm_Click:
    MsgBox Err.Description
    Resume Exit_cmdCPE_EntryForm_Click

End Sub
</code></pre>

<p>Thx in advance for any assitance.</p>