We help IT Professionals succeed at work.
Get Started

Access VBA application: Placed in a State that prevents it from being opened or locked

cipriano555 asked
Last Modified: 2016-02-11
I am developing an Access 2013 application. In testing, the first time I run through my process, it works. When I try to run the application a second time, I get the message,   "The database has been placed in a state...that prevents it from being opened or locked."  

I am developing this on my laptop.  There is no network, or multiple users involved.  The application retrieves data from a SQL Server database and copies it into an Access table.   The error shown in the attached image occurs at this statement:   cnDest.Open CurrentProject.Connection

  Dim cnDest As New ADODB.Connection
 cnDest.Open CurrentProject.Connection

If I close access and open it up again, the error is gone and I can run the process again...but that is not a fix for the problem.  I researched on the web...nothing conclusive.

Thanks for your help
Watch Question
President / Owner
Most Valuable Expert 2017
This problem has been solved!
Unlock 1 Answer and 5 Comments.
See Answer
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE