Solved

Open Access Window remains and will not close

Posted on 2000-03-23
4
291 Views
Last Modified: 2011-04-14
If I run the following code and then close the mdb file, there remains an open Access window which will minimise but will not close. How can I prevent this?


Public Sub AddIconProperty()
   
    Dim prpAppIcon
    Dim prop As Property
           
    Set dbs = CurrentDb
    Set prpAppIcon = dbs.CreateProperty("AppIcon")
    prpAppIcon.Name = "AppIcon"
    prpAppIcon.Type = dbText
    prpAppIcon.Value = "C:\My Documents\Other\WORK\Rimses Reports\Reports.ico"
    On Error GoTo Err_Appending_Property
    dbs.Properties.Append prpAppIcon

    RefreshTitleBar
       
Exit_AddIconProperty:
    Exit Sub
   
Err_Appending_Property:
    Exit Sub
       
End Sub


Nick
0
Comment
Question by:ncw
  • 2
4 Comments
 
LVL 2

Expert Comment

by:goyam
ID: 2649351
Hi,
try to set all object to nothing before exit:
set dbs=nothing
set prpAppIcon =nothing.
Regards
0
 
LVL 1

Accepted Solution

by:
pclement earned 25 total points
ID: 2649974
I think you've encountered a documented bug in Access. See the following:

ACC97: Unable to Quit Microsoft Access
http://support.microsoft.com/support/kb/articles/Q190/0/74.ASP

0
 
LVL 1

Author Comment

by:ncw
ID: 2667091
It seems to have solved its self, I must have modified the code and its ok now. Thanks
0
 
LVL 1

Expert Comment

by:pclement
ID: 2667260
Those are the best kind. ;-)

Thanks.
0

Featured Post

Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

Join & Write a Comment

In the article entitled Working with Objects – Part 1 (http://www.experts-exchange.com/Microsoft/Development/MS_Access/A_4942-Working-with-Objects-Part-1.html), you learned the basics of working with objects, properties, methods, and events. In Work…
In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now