Connecting Tech Pros Worldwide Help | Site Map

Access will not close

 
LinkBack Thread Tools Search this Thread
  #1  
Old November 12th, 2005, 06:52 PM
Jeff
Guest
 
Posts: n/a
Default Access will not close

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?

  #2  
Old November 12th, 2005, 06:52 PM
Albert D. Kallal
Guest
 
Posts: n/a
Default Re: Access will not close

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
NoooSPAmkallal@msn.com
http://www.attcanada.net/~kallal.msn


  #3  
Old November 12th, 2005, 06:59 PM
Tony Toews
Guest
 
Posts: n/a
Default Re: Access will not close

jmrkvicka@ruralins.com (Jeff) wrote:
[color=blue]
>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?[/color]

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
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Popular Articles

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over 220,840 network members.