Form to run query Error 2001

G

Guest

I created a query to run with a form using the example at
htto://office.micorsoft.com/en-us/assistance/HA011170771033.aspx?

the code for the OK button is

Private Sub OK_Click()
Me.Visible = False
Docmd.OpenQuery "Breed Summary Query", acViewNormal, acEdit
DoCmd.Close acForm, "Breed Summary Form"
End Sub

I am getting error 2001 "you canceled your previous action".

Any help would be great! Thanks!
 
A

Allen Browne

This message can indicate that there is a problem with the query you tried
to open.

Does the query work if you open it directly from the Database window?

This might also help identify the problem:
1. Uncheck the boxes under:
Tools | Options | General | Name AutoCorrect
Explanation of why:
http://allenbrowne.com/bug-03.html

2. Compact the database to get rid of this junk:
Tools | Database Utilities | Compact
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top