• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 302
  • Last Modified:

Open Access Window remains and will not close

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
ncw
Asked:
ncw
  • 2
1 Solution
 
goyamCommented:
Hi,
try to set all object to nothing before exit:
set dbs=nothing
set prpAppIcon =nothing.
Regards
0
 
pclementCommented:
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
 
ncwAuthor Commented:
It seems to have solved its self, I must have modified the code and its ok now. Thanks
0
 
pclementCommented:
Those are the best kind. ;-)

Thanks.
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now