Results 1 to 7 of 7
  1. #1
    Star Lounger
    Join Date
    Jan 2003
    Location
    Manchester, Lancashire, England
    Posts
    92
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Shutdown (XP/2002)

    Often when I shut Access down it's shut down under Task Manager Applications but MSACCESS.EXE is still running under processes & I can't restart Access normally until I've killed the process manually. I've tried all the shutdown methods I can think of & none consistantly kill the processes. How do I prevent this happening. TIA

  2. #2
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Shutdown (XP/2002)

    Check your code. This generally happens because you have one of several coding issues. Here are two that can cause you problems:

    1. You create object variables and don't explicitly destory them
    <UL><LI>You Dim dbs As DAO.Database object but forget to use Set dbs = Nothing at the end of the routine
    <LI>Your code bypasses the exit routine that would destroy the object variable, such as using an Exit Sub within the code.[/list]2. You use a control value as an implied boolean in a conditional expression instead of an explicit test or a forced evaluation
    <UL><LI>You use If Me!Checkbox Then instead of If Me!Checkbox = True Then or If (Me!Checkbox) Then[/list]Generally, object variables (variables populating using the Set keyword, should be explicitly destroyed. They should be destroyed automatically when they go out of scope, but VBA is a bit sloppy about that. It can cause you problems in Access unless you get in the habit of always destroying objects populated with the Set keyword.
    Charlotte

  3. #3
    Star Lounger
    Join Date
    Jan 2003
    Location
    Manchester, Lancashire, England
    Posts
    92
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Shutdown (XP/2002)

    Thanks for the response but neither possibility strikes a bell. I'm one of those Access users that has not yet had to get my figures dirty with real VBA. Everything I need to do so far has been done with 'standard objects'. Any other thoughts?

  4. #4
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Shutdown (XP/2002)

    Standard objects? Are you using any code at all?
    Charlotte

  5. #5
    Star Lounger
    Join Date
    Jan 2003
    Location
    Manchester, Lancashire, England
    Posts
    92
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Shutdown (XP/2002)

    If I understand the question correctly, only macros & eg a tad to prevent a report opening if there is no data.

  6. #6
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,624
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Shutdown (XP/2002)

    What do you mean by a tad? In general, if you prevent a report form opening, it's some sort of event procedure that executes when the report presents the "No Data" event, so that is code. As well, if you are using any buttons on forms or the Microsoft switchboard, or a combo box for record navigation, there will be some code running. Was your database originally developed in Access 2002, or has it been migrated from Access 97 or 2000?
    Wendell

  7. #7
    Star Lounger
    Join Date
    Jan 2003
    Location
    Manchester, Lancashire, England
    Posts
    92
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Shutdown (XP/2002)

    OK I do have buttons on forms & on switchboards tho' the buttons fire macros. I do use combo boxes for navigation. The db was first born in Access97 & migrated to 2000 & then XP. The shutdown problem is recent; certainly long after the migration to XP. In December I did a major rewrite but I can't associate the problem with anything particular & it's not consistant.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •