form will not close

G

Guest

Hi Everyone
I recently split my database. Now one of the froms is acting up on me.
Sometimes the "X" close button does not work.Maximize and minimise buttons
work all the time. Then "X" stops working on all forms. After I manage to
close Front End and open it again - works like a charm. Any ideas?

Barb
 
A

Allen Browne

Where an object will not close, it indicates either that it is still in use
(e.g. some code is still running, or some object in its code is still
executing, or some object has not been released), or at least that Access
thinks it cannot be released.

You might track down what code is called from this form. If any objects are
opened (e.g. recordsets), make sure you close them. If any objects are set,
make sure you set them to Nothing at the end of their procedure, before they
go out of scope. Watch out for any code that could be re-entrant. If you
have any forms with a Timer event, temporarily get rid of that code to see
if it is contributing to the problem.

If none of that helps, there could be something causing Access to be
confused about the file. Try this sequence:
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

3. Close Access. Make a backup copy of the file. Decompile the database by
entering something like this at the command prompt while Access is not
running. It is all one line, and include the quotes:
"c:\Program Files\Microsoft office\office\msaccess.exe" /decompile
"c:\MyPath\MyDatabase.mdb"

4. Open Access, and compact again.
 
G

Guest

thanks Allen
I think they're still in recordset when they try to close it. At least thet
makes most sense here.It's data entry form. I'll keep watching it.

thank yo again
Barb
 

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