Access Doesn't Close

D

Devlin

I am operating with Access 98 and have recently experienced a problem where
upon attempting to exit the program, Access minimizes but will not close. In
some cases I may have more than one copy of the program running, but this is
not a constant. This can happen either after doing some modifications to the
database program structure or just modifying data.

Is there any information regarding this problem and possibly a fix?
 
V

Van T. Dinh

There could be a number of reasons for this behaviour. The most common one
is that objects (such as Recordset) are created in code but they are never
closed and the object variables are not set to Nothing. Access is supposed
to do these but sometimes, it leaves objects behind. Therefore, it is always
safer to clean up by code rather than relying on Access.

Also, Compact and Repair your database regularly.

BTW, there is no Access 98. The more recent versions are 97, 2000, 2002
(XP) and 2003.

HTH
Van T. Dinh
MVP (Access)
 
A

Allen Browne

Presumably we are talking about Access 97?

See:
Access minimizes to Windows toolbar instead of closing
at:
http://www.mvps.org/access/bugs/bugs0005.htm

Note that it is fairly easy to corrupt a database if you are making design
changes to two instances at the same time. If you have been doing this, it
would at least by worth decompiling a copy of 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"
 
D

Devlin

Thanks for the info and yes I meant Access 97. A little fat fingering there.
Hopefully you can answer another question...

I am working with class modules and have dedicated several to particular
tables in this DB project. I am calling some of the functions within the
class objects directly without creating a new instance of the class. I am a
beginner when it comes to working with class modules.

Here is an example. I have a class module called class_stores. In this
module I have a function: DBLookUpStoreID(sStoreName as String) as Long.

I will call on this function from forms or other modules to look up the
store ID for a particular store name (i.e. lStoreID =
class_stores.DBLookUpStoreID("Giant")).

Question: Is this acceptable, or can it cause problems such as the one
described?
 
D

Devlin

Thanks for the tip... Yes I did mean Access 97, unfortunately I fat fingured
the keys when typing. Ooops.

When I spoke of two instances of the program running, I didn't mean that I
was working two instances of one database. I meant that I had two instances
of the Access application running.

Once again thanks, your tip was helpful.
 
Top