473,405 Members | 2,282 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

Access database will not restart after using VBA to close until I reboot

gnawoncents
214 100+
Greetings--I'm hoping someone who has had this problem before can help me find a way ahead.

Problem: When I use VBA or a macro to close my database, I cannot reopen it without rebooting my computer. When I try to reopen, the record locking file appears, but the database never opens nor does it appear in the Task Manager.

Update: I also get this problem when closing the database using the "x", but only after this particular form has been opened. There are no other open forms, and the form is not linked to a table or query of any sort.

I am running Access 2013 on Windows 8.1 Enterprise (64 bit).

I have tried using the button wizard to embed the macro that closes Access as well as various options in VBA directly (docmd.quit, docmd.closedatabase, access.quit, and a few others) but all result in the same problem.

Ideas? Thanks in advance for any help.
Dec 9 '16 #1
5 1372
PhilOfWalton
1,430 Expert 1GB
No idea but questions that might help someone.

Are you running this as a front end / back end DB?
If so are you running on a network or single computer?
If so are the tables linked directly to the FE database?
When you use something like DoCmd.Quit, does the .LDB lock file vanish?
Again in a FE /BE situation. there will probably be a lock file for both the FE database & BE database. What happens with these?

Phil
Dec 9 '16 #2
jforbes
1,107 Expert 1GB
You also might want to try repairing your Office installation.
Dec 9 '16 #3
gnawoncents
214 100+
Thank you for the inputs.

Additional information:
- I am running this as a front end with a split backend.
- I am currently developing the database, so I'm running it on a single computer
- This particular form that is causing the problem (it doesn't happen with any other form) is not linked to any tables, so the backend does not engage.
- When I close the database manually or via VBA, the lock file vanishes. When I try to reopen the database, it reappears but the program never opens. It can no longer be closed/deleted at this point without a computer restart.
- Just to clarify, this problem only presents with this particular form and no other. The form contains a label, a text box that populates on form startup (see below) and the button to quit/close.

Expand|Select|Wrap|Line Numbers
  1. Option Compare Database
  2.  
  3. Private Sub Command5_Click()
  4.  
  5. Application.Quit
  6.  
  7. End Sub
  8.  
  9. Private Sub Form_Open(Cancel As Integer)
  10.  
  11. txtUsername = "No existing profile was found for you (Username: " & Environ("USERNAME") & ")."
  12.  
  13. End Sub
  14.  
Dec 9 '16 #4
PhilOfWalton
1,430 Expert 1GB
Don't think it will help, but IMO you should always use Option Explicit after Option Compare Database in all your modules. That will check that references are correct.

You should have 2 lock files (one for the data and one for the program) once the DB has successfully opened, and both should vanish when the DB closes.

Have you tried decompiling the database?
Have you tried creating a new database and importing all objects?
Have you tried re-installing Office?

Phil
Dec 9 '16 #5
gnawoncents
214 100+
Thank you for the suggestions. Unfortunately, I do not have the luxury of re-installing Access without going through a lot of red tape at work and a long wait after, so I'm pressing through what I can until then. I have, however, through a process of elimination been able to pinpoint the problem.

UPDATE: The problem occurs when I set the form to "Pop Up." if I set Pop Up to NO, the problem disappears. Unfortunately, I need the form to be a Pop Up. I even tried recreating the form to the same effect--every time I set it to Pop Up, Access will not restart without rebooting my computer. Has anyone experienced anything like this before?
Dec 12 '16 #6

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: desc | last post by:
I am trying to create an access db using ADOX in C# and I am finding difficulties to find documentation on this in msdn library. Does anyone have any documentation or samples of creating an access...
8
by: lkrubner | last post by:
An old friend of mine recently approached me and said something like: "I've a computer at my office that has an Access database running on it. We've most of our company info in there. We'd like to...
1
by: Lisa | last post by:
I have an asp.net website with an Access Database that works great on my local server, but when I migrated to our production server, none of my sql processes works (i.e update, insert, delete) Does...
2
by: jritacco | last post by:
I have a user that is somehow managing to open multiple copies of a single Access database. We are using Access 2003 and everything I have tried makes it IMPOSSIBLE to open the same database more...
1
by: ravikiranveluguleti | last post by:
hi, this is ravikiran, I have a situation where i need to create an ms-access database with one table in it at runtime when an user clicks on a button in my front end. Is there any way to...
1
by: leaf0209 | last post by:
Hi, I am new to this forum and have been troubled by this problem for the past few days. I would appreciate if someone would take a look and help me out. I am using vb express 2005 edition... I...
1
by: dipali sawant | last post by:
I am using JavaScript to access database. If I use a local database it works fine. If I use another database server it gives error. I did settings in internet options but it works correct only for...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.