Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"Application.Quit " not working

Status
Not open for further replies.

DougAtAvalon

Programmer
Jan 29, 2001
99
US
On the on close event of a form I have:

"Application.quit" it closes the database but not Access
More oddly, I have a "Stop" line befor it and sometimes it doesn't stop

i have done this before and it has worked fine

Any clues?

-Doug
 
Hi Doug,
Try this, and you should wrap your code with some error handling to find the bugs so:

'Your Subs event title

On Error GoTo Err1

Application.Quit acQuitSaveAll
CloseCurrentDatabase

Exit1:
Exit Sub

Err1:
MsgBox Err.Number & " " & Err.Description
Resume Exit1

'End Sub here
Gord
ghubbell@total.net
 
Try docmd.quit John Fill
1c.bmp


ivfmd@mail.md
 
I think that ghubbell is on the right path, it sounds like you have another function that's running, doing a "Quit" on you before it gets to your Application.Quit. I believe the docmd.Quit just closes the .mdb not Access itself.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top