p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   BOOK: Beginning Access 2003 VBA (http://p2p.wrox.com/forumdisplay.php?f=150)
-   -   Chapter 5 Code, problems? (http://p2p.wrox.com/showthread.php?t=33643)

tmorgan September 23rd, 2005 07:53 AM

Chapter 5 Code, problems?
Hello, I have been going step by step through the book. I have had major problems in the Chapter 5 section doing the code for the bound and unbound form. Both give an error when I try to run them. The bound form an error such as

"You do not have exclusive access, so you may not be able to save changes later"

and the unbound one

"The database has been placed in a state by user 'Admin' on machine 'blahblah' that prevents it from being opened or locked."

So I downloaded the book's code and it gave me the same error with the unbound form.

When I change from running the form to going to design mode, it asks if I want to save all information. I click yes then it pops the same error up.

I am spinning my wheels :/

econophil September 28th, 2005 01:05 PM

I would guess this is an ownership or properties issue. Do you sometimes log on as administrator and sometimes as some (ordinary) user? Maybe you started the project as administrator and are now trying to work on it as ordinary user.

If this sounds plausible, log on as admin, go to the db in Explorer, right click the title, then right click "Properties" and then click on the Security tab to give yourself rights as ordinary user.

Hope this helps.

econophil October 10th, 2005 10:30 AM

My "ownership/permissions" hypothesis was wrong, I think. I"m now getting similar problems. These two error messages (also when logged in as administrator):

     "The database has been placed in a state by user 'Admin' on machine xxx that prevens it from being opened or locked."


     "You do not have exclusive access to the database at this time. If you proceed to make changes, you may not be able to save them."

I tried running the DB as administrator and got the same problems. This is what happens:
     If I open the form in Form View, it works OK. If I then go to design view and try to write or change the code, I get the error messages. I think that's because of the connection established by first opening in form view.
     If I open the form directly in design view, I can then change the form or the code without this problem arising. I then close the form and reopen it in form view (rather than switching to form view) and it seems to work OK.

Something similar seems to happen if one opens more than one of the forms at once.

alecwood February 12th, 2007 07:26 AM

Save the database. As soon as you change the design, the database is locked and will not accept any more external connections. Though it's you that's connecting, and it's you that has the database open, the adodb connection acts as an external connection and is refused.

That's my understanding anyway, but I am still reading this book so I don't know much LOL

All times are GMT -4. The time now is 07:28 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.