Access Shell/Instance wont quit

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Andrew Chanter

    #1

    Access Shell/Instance wont quit

    I have a VB app that has a routine that runs macros in a (password
    protected) Access 97 db. (I have attached the code below.) Most of these
    macros end up opening a form in the Access db for the user to interract
    with.When the user finishes in the Access session they quit and are returned
    to the VB app. Problem is that in many cases, when the user quits the
    Access session, an Access 'shell' remains in the taskbar that cannot be
    removed except by calling the task manager. This problem is compounded the
    more times the user calls the macro. This seems to be some kind of bug as
    it does not occur all the time. If the user clicks a button with the code
    Docmd.Quit to exit the Access session, they are left with the shell. If
    they instead click the x button at the top right of their screen, most of
    the time the shell unloads - but not always.

    Any suggestions???

    PS the method of opening the password protected db for interraction is a
    result of trawling user groups and is not the source of the problem as this
    used to occur before the db was protected.



    Dim DAODB As dao.Database
    Dim objAccessApp As Access.Applicat ion

    ' Open DB (with password)
    Set DAODB = objAccessApp.DB Engine.OpenData Base(DBPath, False, False,
    ";pwd=" & DBPassword)
    objAccessApp.Op enCurrentDataba se DBPath, False
    DAODB.Close
    Set DAODB = Nothing
    objAccessApp.Do Cmd.RunMacro MacroName
    objAccessApp.Vi sible = True
    objAccessApp.Do Cmd.Maximize


  • Tom van Stiphout

    #2
    Re: Access Shell/Instance wont quit

    On Mon, 03 May 2004 08:13:03 GMT, "Andrew Chanter"
    <helpme@radsolu tions.com.au> wrote:

    Seems your problem is that the Access instance doesn't quit, which
    most likely has nothing to do with how you launched it. This is a FAQ.
    You should have no trouble finding help at groups.google.c om.

    -Tom.

    [color=blue]
    >I have a VB app that has a routine that runs macros in a (password
    >protected) Access 97 db. (I have attached the code below.) Most of these
    >macros end up opening a form in the Access db for the user to interract
    >with.When the user finishes in the Access session they quit and are returned
    >to the VB app. Problem is that in many cases, when the user quits the
    >Access session, an Access 'shell' remains in the taskbar that cannot be
    >removed except by calling the task manager. This problem is compounded the
    >more times the user calls the macro. This seems to be some kind of bug as
    >it does not occur all the time. If the user clicks a button with the code
    >Docmd.Quit to exit the Access session, they are left with the shell. If
    >they instead click the x button at the top right of their screen, most of
    >the time the shell unloads - but not always.
    >
    >Any suggestions???
    >
    >PS the method of opening the password protected db for interraction is a
    >result of trawling user groups and is not the source of the problem as this
    >used to occur before the db was protected.
    >
    >
    >
    >Dim DAODB As dao.Database
    >Dim objAccessApp As Access.Applicat ion
    >
    >' Open DB (with password)
    > Set DAODB = objAccessApp.DB Engine.OpenData Base(DBPath, False, False,
    >";pwd=" & DBPassword)
    > objAccessApp.Op enCurrentDataba se DBPath, False
    > DAODB.Close
    > Set DAODB = Nothing
    > objAccessApp.Do Cmd.RunMacro MacroName
    > objAccessApp.Vi sible = True
    > objAccessApp.Do Cmd.Maximize
    >[/color]

    Comment

    • Andrew Chanter

      #3
      Re: Access Shell/Instance wont quit

      This is an FAQ (Frequently Asked Question)

      Unfortunately it is not a WAQ (Well Answered Question.)

      I have found multiple references on Google to others having similar
      difficulty (mainly with Excel) but no tip that solves the problem or
      explains why it happens.
      I have taken on board all suggestions from the groups but to no avail. If
      you can provide a link to a thread I would be appreciative.


      "Tom van Stiphout" <tom7744@no.spa m.cox.net> wrote in message
      news:rnjc90t69u 30piot6u07i47hd o5t956red@4ax.c om...[color=blue]
      > On Mon, 03 May 2004 08:13:03 GMT, "Andrew Chanter"
      > <helpme@radsolu tions.com.au> wrote:
      >
      > Seems your problem is that the Access instance doesn't quit, which
      > most likely has nothing to do with how you launched it. This is a FAQ.
      > You should have no trouble finding help at groups.google.c om.
      >
      > -Tom.
      >
      >[color=green]
      > >I have a VB app that has a routine that runs macros in a (password
      > >protected) Access 97 db. (I have attached the code below.) Most of[/color][/color]
      these[color=blue][color=green]
      > >macros end up opening a form in the Access db for the user to interract
      > >with.When the user finishes in the Access session they quit and are[/color][/color]
      returned[color=blue][color=green]
      > >to the VB app. Problem is that in many cases, when the user quits the
      > >Access session, an Access 'shell' remains in the taskbar that cannot be
      > >removed except by calling the task manager. This problem is compounded[/color][/color]
      the[color=blue][color=green]
      > >more times the user calls the macro. This seems to be some kind of bug[/color][/color]
      as[color=blue][color=green]
      > >it does not occur all the time. If the user clicks a button with the[/color][/color]
      code[color=blue][color=green]
      > >Docmd.Quit to exit the Access session, they are left with the shell. If
      > >they instead click the x button at the top right of their screen, most of
      > >the time the shell unloads - but not always.
      > >
      > >Any suggestions???
      > >
      > >PS the method of opening the password protected db for interraction is a
      > >result of trawling user groups and is not the source of the problem as[/color][/color]
      this[color=blue][color=green]
      > >used to occur before the db was protected.
      > >
      > >
      > >
      > >Dim DAODB As dao.Database
      > >Dim objAccessApp As Access.Applicat ion
      > >
      > >' Open DB (with password)
      > > Set DAODB = objAccessApp.DB Engine.OpenData Base(DBPath, False, False,
      > >";pwd=" & DBPassword)
      > > objAccessApp.Op enCurrentDataba se DBPath, False
      > > DAODB.Close
      > > Set DAODB = Nothing
      > > objAccessApp.Do Cmd.RunMacro MacroName
      > > objAccessApp.Vi sible = True
      > > objAccessApp.Do Cmd.Maximize
      > >[/color]
      >[/color]


      Comment

      • Tom van Stiphout

        #4
        Re: Access Shell/Instance wont quit

        On Mon, 03 May 2004 23:26:03 GMT, "Andrew Chanter"
        <helpme@radsolu tions.com.au> wrote:



        -Tom.

        [color=blue]
        >This is an FAQ (Frequently Asked Question)
        >
        >Unfortunatel y it is not a WAQ (Well Answered Question.)
        >
        >I have found multiple references on Google to others having similar
        >difficulty (mainly with Excel) but no tip that solves the problem or
        >explains why it happens.
        >I have taken on board all suggestions from the groups but to no avail. If
        >you can provide a link to a thread I would be appreciative.
        >
        >
        >"Tom van Stiphout" <tom7744@no.spa m.cox.net> wrote in message
        >news:rnjc90t69 u30piot6u07i47h do5t956red@4ax. com...[color=green]
        >> On Mon, 03 May 2004 08:13:03 GMT, "Andrew Chanter"
        >> <helpme@radsolu tions.com.au> wrote:
        >>
        >> Seems your problem is that the Access instance doesn't quit, which
        >> most likely has nothing to do with how you launched it. This is a FAQ.
        >> You should have no trouble finding help at groups.google.c om.
        >>
        >> -Tom.
        >>
        >>[color=darkred]
        >> >I have a VB app that has a routine that runs macros in a (password
        >> >protected) Access 97 db. (I have attached the code below.) Most of[/color][/color]
        >these[color=green][color=darkred]
        >> >macros end up opening a form in the Access db for the user to interract
        >> >with.When the user finishes in the Access session they quit and are[/color][/color]
        >returned[color=green][color=darkred]
        >> >to the VB app. Problem is that in many cases, when the user quits the
        >> >Access session, an Access 'shell' remains in the taskbar that cannot be
        >> >removed except by calling the task manager. This problem is compounded[/color][/color]
        >the[color=green][color=darkred]
        >> >more times the user calls the macro. This seems to be some kind of bug[/color][/color]
        >as[color=green][color=darkred]
        >> >it does not occur all the time. If the user clicks a button with the[/color][/color]
        >code[color=green][color=darkred]
        >> >Docmd.Quit to exit the Access session, they are left with the shell. If
        >> >they instead click the x button at the top right of their screen, most of
        >> >the time the shell unloads - but not always.
        >> >
        >> >Any suggestions???
        >> >
        >> >PS the method of opening the password protected db for interraction is a
        >> >result of trawling user groups and is not the source of the problem as[/color][/color]
        >this[color=green][color=darkred]
        >> >used to occur before the db was protected.
        >> >
        >> >
        >> >
        >> >Dim DAODB As dao.Database
        >> >Dim objAccessApp As Access.Applicat ion
        >> >
        >> >' Open DB (with password)
        >> > Set DAODB = objAccessApp.DB Engine.OpenData Base(DBPath, False, False,
        >> >";pwd=" & DBPassword)
        >> > objAccessApp.Op enCurrentDataba se DBPath, False
        >> > DAODB.Close
        >> > Set DAODB = Nothing
        >> > objAccessApp.Do Cmd.RunMacro MacroName
        >> > objAccessApp.Vi sible = True
        >> > objAccessApp.Do Cmd.Maximize
        >> >[/color]
        >>[/color]
        >[/color]

        Comment

        • Terry Kreft

          #5
          Re: Access Shell/Instance wont quit

          Well at some point in the code I would have expected to see

          objAccessApp.Qu it
          'and
          Set objAccessApp = Nothing


          When automating an application it is very common that the application does
          not quit just because the object variable goes out of scope.

          --
          Terry Kreft
          MVP Microsoft Access


          "Andrew Chanter" <helpme@radsolu tions.com.au> wrote in message
          news:janlc.9227 $TT.755@news-server.bigpond. net.au...[color=blue]
          > I have a VB app that has a routine that runs macros in a (password
          > protected) Access 97 db. (I have attached the code below.) Most of these
          > macros end up opening a form in the Access db for the user to interract
          > with.When the user finishes in the Access session they quit and are[/color]
          returned[color=blue]
          > to the VB app. Problem is that in many cases, when the user quits the
          > Access session, an Access 'shell' remains in the taskbar that cannot be
          > removed except by calling the task manager. This problem is compounded[/color]
          the[color=blue]
          > more times the user calls the macro. This seems to be some kind of bug as
          > it does not occur all the time. If the user clicks a button with the code
          > Docmd.Quit to exit the Access session, they are left with the shell. If
          > they instead click the x button at the top right of their screen, most of
          > the time the shell unloads - but not always.
          >
          > Any suggestions???
          >
          > PS the method of opening the password protected db for interraction is a
          > result of trawling user groups and is not the source of the problem as[/color]
          this[color=blue]
          > used to occur before the db was protected.
          >
          >
          >
          > Dim DAODB As dao.Database
          > Dim objAccessApp As Access.Applicat ion
          >
          > ' Open DB (with password)
          > Set DAODB = objAccessApp.DB Engine.OpenData Base(DBPath, False, False,
          > ";pwd=" & DBPassword)
          > objAccessApp.Op enCurrentDataba se DBPath, False
          > DAODB.Close
          > Set DAODB = Nothing
          > objAccessApp.Do Cmd.RunMacro MacroName
          > objAccessApp.Vi sible = True
          > objAccessApp.Do Cmd.Maximize
          >
          >[/color]


          Comment

          Working...