By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,027 Members | 1,313 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,027 IT Pros & Developers. It's quick & easy.

Access will not close

P: n/a
I have an access application that worked fine under access 97,
however, when it was converted to access 2002, access would no longer
close when the application was closed (using application.quit). The
application itself closes, but access remains open, and the only way
to close it is by control-alt-delete and ending the task. Does anyone
know why this is happening, and only under access 2002?
Nov 12 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Hum, useally hte problem occurs in a97!

This often means that you have a open recordset somewhere in your code. This
is especially noticeable for GLOBAL reocrdset code.

So, for all reocrdsets that YOU open, make sure you both close the
reocrdset, and then set the recordset to nothing.

Example code to open a table, display all names to the debug window, and
then close:
dim rstRecs as dao.recordset
dim strSql as string

strSql = "select LastName from tblCustomers where City = 'Edmonton'"

set rstRecs = currentdb.OpenrecordSet(strSql)

do while rstRecs.EOF = false
debug.Print rstRecs!LastName
rstRecs.MoveNext
loop

rstRecs.Close
set rstRecs = nothing

So, check all of your recordset code, and make sure you always close the
recordset when done. That should fix the exit problem. You don't of course
have to close stuff like recordsetclone...but ONLY stuff YOUR code opens...
--
Albert D. Kallal (MVP)
Edmonton, Alberta Canada
No************@msn.com
http://www.attcanada.net/~kallal.msn
Nov 12 '05 #2

P: n/a
jm*******@ruralins.com (Jeff) wrote:
I have an access application that worked fine under access 97,
however, when it was converted to access 2002, access would no longer
close when the application was closed (using application.quit). The
application itself closes, but access remains open, and the only way
to close it is by control-alt-delete and ending the task. Does anyone
know why this is happening, and only under access 2002?


Also see Access minimizes to Windows 95/NT toolbar instead of closing
http://www.mvps.org/access/bugs/bugs0005.htm

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Nov 12 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.