S
Scott
I have a simple databased developed on Access 97. Recently I converted it
to 2003 but not work on a parameter query. The program starts with a
opening form. When I press "Esc" key, it will open a form that connects to
a parameter query. The parameter query box appeared. Once I entered the
key words, it failed and display the following error.
Run-time error '2501':
The OpenForm action was canceled.
When click Debug button, it showed
Private Sub Form_KeyPress(KeyAscii As Integer)
If KeyAscii = 27 Then
DoCmd.Close acForm, "frmContributor", acSaveYes
DoCmd.OpenForm "frmTechInfo"
Else
Beep
End If
End Sub
The fourth line was highlighted in yellow. Can someone advise the possible
causes and fixes.
Thanks,
Scott
to 2003 but not work on a parameter query. The program starts with a
opening form. When I press "Esc" key, it will open a form that connects to
a parameter query. The parameter query box appeared. Once I entered the
key words, it failed and display the following error.
Run-time error '2501':
The OpenForm action was canceled.
When click Debug button, it showed
Private Sub Form_KeyPress(KeyAscii As Integer)
If KeyAscii = 27 Then
DoCmd.Close acForm, "frmContributor", acSaveYes
DoCmd.OpenForm "frmTechInfo"
Else
Beep
End If
End Sub
The fourth line was highlighted in yellow. Can someone advise the possible
causes and fixes.
Thanks,
Scott