PC Review


Reply
Thread Tools Rate Thread

Code won't quit

 
 
=?Utf-8?B?QWxseU9vcA==?=
Guest
Posts: n/a
 
      19th Mar 2006
I am running a macro that contains a RunCode command.
After the code runs, there is a quit to close the database.
This worked fine in Access 97, but when I converted the db to Access 2003,
the code will run great, but the quit doesn't happen. I believe this is
because Access thinks the code is still running. Is there anyway to hard code
an end code into the module to make sure the code stops running and the db
can close?
Thanks!
 
Reply With Quote
 
 
 
 
tina
Guest
Posts: n/a
 
      19th Mar 2006
to close Access from within a VBA procedure, use

Application.Quit acQuitSaveNone

hth


"AllyOop" <(E-Mail Removed)> wrote in message
news:C98F1412-DC7F-4505-9336-(E-Mail Removed)...
> I am running a macro that contains a RunCode command.
> After the code runs, there is a quit to close the database.
> This worked fine in Access 97, but when I converted the db to Access 2003,
> the code will run great, but the quit doesn't happen. I believe this is
> because Access thinks the code is still running. Is there anyway to hard

code
> an end code into the module to make sure the code stops running and the db
> can close?
> Thanks!



 
Reply With Quote
 
=?Utf-8?B?QWxseU9vcA==?=
Guest
Posts: n/a
 
      19th Mar 2006
Forgive my limited VBA knowledge, but where in the procedure do I add this
line?
Thanks!

"tina" wrote:

> to close Access from within a VBA procedure, use
>
> Application.Quit acQuitSaveNone
>
> hth
>
>
> "AllyOop" <(E-Mail Removed)> wrote in message
> news:C98F1412-DC7F-4505-9336-(E-Mail Removed)...
> > I am running a macro that contains a RunCode command.
> > After the code runs, there is a quit to close the database.
> > This worked fine in Access 97, but when I converted the db to Access 2003,
> > the code will run great, but the quit doesn't happen. I believe this is
> > because Access thinks the code is still running. Is there anyway to hard

> code
> > an end code into the module to make sure the code stops running and the db
> > can close?
> > Thanks!

>
>
>

 
Reply With Quote
 
tina
Guest
Posts: n/a
 
      19th Mar 2006
add it below the code that's doing whatever it is the procedure is supposed
to do, and above the End line. also, note that if you use the Quit command
in VBA, you'll want to remove the Quit command in the macro.

hth


"AllyOop" <(E-Mail Removed)> wrote in message
news:4C7D64B2-2FD3-4C3F-B200-(E-Mail Removed)...
> Forgive my limited VBA knowledge, but where in the procedure do I add this
> line?
> Thanks!
>
> "tina" wrote:
>
> > to close Access from within a VBA procedure, use
> >
> > Application.Quit acQuitSaveNone
> >
> > hth
> >
> >
> > "AllyOop" <(E-Mail Removed)> wrote in message
> > news:C98F1412-DC7F-4505-9336-(E-Mail Removed)...
> > > I am running a macro that contains a RunCode command.
> > > After the code runs, there is a quit to close the database.
> > > This worked fine in Access 97, but when I converted the db to Access

2003,
> > > the code will run great, but the quit doesn't happen. I believe this

is
> > > because Access thinks the code is still running. Is there anyway to

hard
> > code
> > > an end code into the module to make sure the code stops running and

the db
> > > can close?
> > > Thanks!

> >
> >
> >



 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Code to quit an application Jay Microsoft C# .NET 7 25th Jan 2007 10:40 PM
Anything wrong with using this code to Quit? Bob Microsoft Access 2 12th Sep 2006 10:51 AM
Run Code and then quit =?Utf-8?B?RGF2aWQ=?= Microsoft Access 3 21st Feb 2005 04:16 PM
Excel don't quit in ASP.net Code Andreas Friedrichs Microsoft Excel Programming 0 7th Jan 2004 12:16 PM
code to quit Edwin Merced Microsoft Excel Discussion 2 9th Nov 2003 04:32 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:28 AM.