Results 1 to 6 of 6
  1. #1
    Star Lounger
    Join Date
    Jan 2001
    Location
    L.A., California
    Posts
    77
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Quitting Access (2000)

    Having a strange problem...
    My Access 2000 program uses a switchboard. I have a "Quit" button, which is tied to a "Quit" macro via the switchboard manager. The Quit macro runs a function to do some housekeeping, then does a "Quit" action. Very simple macro here.

    The problem is that users are often (but not always) having problems getting back into the database after exitting. They'll double-click on the desktop icon which points to the .mdb, and nothing happens. When we run the task manager, we see the MSACCESS task is there. If we end the task from task manager, all is back to normal, and we can then run the database app from the shortcut.

    It's unclear at this point whether:
    A: Access didn't exit the first time, appearing to close but leaving the process there, or
    B: Access didn't fully start the second time, loading the process into Task Manager, but not fully running.

    These are Win2000 machines. Any idea what's happening here? <img src=/S/help.gif border=0 alt=help width=23 height=15>

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

    Re: Quitting Access (2000)

    Does Access *appear* to exit when they click the Quit button, or does it just minimize to the toolbar? If the latter, you'll have to track down a couple of alternative possibilities: object variables left undestroyed, or the use of a control that contains a boolean value in an If -Endif without a specific equivalency or putting the control is parens to force an evaluation.

    This is almost always a code issue, at least in my experience. It isn't peculiar to Windows 2000, but it's much more prevalent in Access 2000 than in any of its predecessors. I've also seen it in Excel and Word 2000, so it isn't unique to Access.
    Charlotte

  3. #3
    2 Star Lounger bobdog's Avatar
    Join Date
    Jan 2001
    Posts
    108
    Thanks
    3
    Thanked 5 Times in 4 Posts

    Re: Quitting Access (2000)

    Try this:

    Use Switchboard Manager to edit your Exit button on the menu.

    Change the line that says "Exit application" to "Run Code" and put "closeaccess_jss" in the Function Name box to call the following Sub. I also use this routine to make a log entry just before I close Access, but it's not relevant here. This is the barebones routine.

    Public Sub CloseAccess_JSS(pstrMsg As String)
    ' Comments : Closes the current database and Access
    ' Parameters : None
    ' Returns : nothing
    On Error GoTo PROC_ERR
    DoCmd.Quit
    Exit Sub
    PROC_ERR:
    MsgBox "The following error occurred: " & Error$
    Resume Next
    End Sub

  4. #4
    Star Lounger
    Join Date
    Jan 2001
    Location
    L.A., California
    Posts
    77
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Quitting Access (2000)

    Thanks for the quick reply. Access does indeed appear to terminate. No taskbar, no indications at all that it's still "there". I did find an article on the Knowledge Base that *Seems* to address this issue, by searching with the phrase "Quit Access", and filtering by Access 2000. It mentions this as a known bug, and says it's been fixed in service pack 2.

    As a workaround, it says you can run Dcomcnfg, choose "Microsoft Access Application", and on the Identity tab, change from "The Launching User" to "The Interactive User". I've tried that on a user's PC, and it didn't work immediately. As it wasn't convenient to reboot yesterday, I'm hoping that today the problem will be gone.

    Again, thanks for the reply. If you're interested, I'll let you know if that workaround, er, worked.

  5. #5
    Star Lounger
    Join Date
    Jan 2001
    Location
    L.A., California
    Posts
    77
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Quitting Access (2000)

    Thanks for the idea. On the surface, there's no reason to think that the DoCmd.Quit would or should work any better than the Quit macro action. But.....I've been programming long enough to know that logic doesn't always prevail with Microsoft products. So, if the other solution that I mentioned doesn't work, I'll try this.
    Thanks.

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

    Re: Quitting Access (2000)

    We're always interested in what works here! <img src=/S/grin.gif border=0 alt=grin width=15 height=15> Please do pass on the information so that others in need can make use of the work you've already done.
    Charlotte

Posting Permissions

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