Link to home
Start Free TrialLog in
Avatar of alam747
alam747

asked on

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
Avatar of Jez Walters
Jez Walters
Flag of United Kingdom of Great Britain and Northern Ireland image

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!  :-)
whats the code of the command button?
Does your OnClick property contain something like DoCmd.OpenForm "FormName"?

Post some code :)
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 ...
Attach a sample database demonstrating the issue.
Avatar of alam747
alam747

ASKER

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
Create a new form, and apply the code to open this new form.
This is to rule out a corrupted form.
What code is executing when you open your "Debit Memo Data Input" form?
Avatar of alam747

ASKER

I had a backup of the form before it happend therefore decided to use that one instead.
Thanks for your advice
ASKER CERTIFIED SOLUTION
Avatar of alam747
alam747

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of alam747

ASKER

Used the backup db to resolv this issue