Unable to open a access form

While I try to open a form using a command buttom it shows following message "You canceled the previous operation" and could not open the form.
Please advice what to do.

Thanks
alam747Asked:
Who is Participating?
 
alam747Connect With a Mentor Author Commented:
Used the backup db to resolve the issue
0
 
JezWaltersCommented:
I'm afraid you haven't given much information to go on, but is it possible that the "On Open" event handler of the form you are trying to open is cancelling the opening of the form?

You'll have to post a sample database if you want this debugged!  :-)
0
 
Simon BallCommented:
whats the code of the command button?
0
Cloud Class® Course: Python 3 Fundamentals

This course will teach participants about installing and configuring Python, syntax, importing, statements, types, strings, booleans, files, lists, tuples, comprehensions, functions, and classes.

 
Gerwin Jansen, EE MVETopic Advisor Commented:
Does your OnClick property contain something like DoCmd.OpenForm "FormName"?

Post some code :)
0
 
JezWaltersCommented:
You need to post the code that is executed when you click your command button and the code that is executed when the form opens ...
0
 
hnasrCommented:
Attach a sample database demonstrating the issue.
0
 
alam747Author Commented:
Below are the code on click event...
Private Sub Command50_Click()
On Error GoTo Err_Command50_Click

    Dim stDocName As String
    Dim stLinkCriteria As String

    stDocName = "Debit Memo Data Input"
    DoCmd.OpenForm stDocName, , , stLinkCriteria

Exit_Command50_Click:
    Exit Sub

Err_Command50_Click:
    MsgBox Err.Description
    Resume Exit_Command50_Click
End Sub
0
 
hnasrCommented:
Create a new form, and apply the code to open this new form.
This is to rule out a corrupted form.
0
 
JezWaltersCommented:
What code is executing when you open your "Debit Memo Data Input" form?
0
 
alam747Author Commented:
I had a backup of the form before it happend therefore decided to use that one instead.
Thanks for your advice
0
 
alam747Author Commented:
Used the backup db to resolv this issue
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.