PC Review


Reply
Thread Tools Rate Thread

Access 2007 - the command or action 'quit' isn't available now

 
 
Ally Z
Guest
Posts: n/a
 
      1st Jul 2009

I have some Access programs in 2003 and need to migrate to 2007. I developed
some macros in 2003 and the macros will close the Access database at the end
with the Quit command, it is all working fine in 2003, but after migrating it
to 2007, it no longer works and I am getting the error message as below. I
also tried using RunCommand -> Exit, and got the same error message too.

My purpose is to have the Access database automatically close at the end of
the macro. Does anyone know how to solve this issue?

******************************************
The command or action 'Quit' isn't available now.
*You may be in a read-only database or an unconverted database from asn
earlier version of Microsoft Office Access.
*The type of object the action applies to isn't currently selected or isn't
in the active view.
Use only those commands and macro actions that are currently available for
this database.
******************************************

--
Ally Z
MS Office Application Developer
 
Reply With Quote
 
 
 
 
Steve Schapel
Guest
Posts: n/a
 
      2nd Jul 2009

Ally,

Have you set up the Access 2007 database in a Trusted Location?

--
Steve Schapel, Microsoft Access MVP


"Ally Z" <(E-Mail Removed)> wrote in message
news:8715684D-2EBB-467C-8C6E-(E-Mail Removed)...
> I have some Access programs in 2003 and need to migrate to 2007. I
> developed
> some macros in 2003 and the macros will close the Access database at the
> end
> with the Quit command, it is all working fine in 2003, but after migrating
> it
> to 2007, it no longer works and I am getting the error message as below. I
> also tried using RunCommand -> Exit, and got the same error message too.
>
> My purpose is to have the Access database automatically close at the end
> of
> the macro. Does anyone know how to solve this issue?
>
> ******************************************
> The command or action 'Quit' isn't available now.
> *You may be in a read-only database or an unconverted database from asn
> earlier version of Microsoft Office Access.
> *The type of object the action applies to isn't currently selected or
> isn't
> in the active view.
> Use only those commands and macro actions that are currently available for
> this database.
> ******************************************




__________ Information from ESET Smart Security, version of virus signature database 4206 (20090701) __________

The message was checked by ESET Smart Security.

http://www.eset.com



 
Reply With Quote
 
Ally Z
Guest
Posts: n/a
 
      3rd Jul 2009

Hi Steven,

I added the file pathes to the trust center using "Adding new location", but
I am not sure if I did right. My databases are located on company's Intranet
file server, for example the database is located at
\\fileserver\access_automation\Ally Files\METRICS, then I added this path to
the server to the trust center.

Should add the full path including the file name to the trust center?

thanks for your help
--
Ally Z
MS Office Application Developer


"Steve Schapel" wrote:

> Ally,
>
> Have you set up the Access 2007 database in a Trusted Location?
>
> --
> Steve Schapel, Microsoft Access MVP
>
>
> "Ally Z" <(E-Mail Removed)> wrote in message
> news:8715684D-2EBB-467C-8C6E-(E-Mail Removed)...
> > I have some Access programs in 2003 and need to migrate to 2007. I
> > developed
> > some macros in 2003 and the macros will close the Access database at the
> > end
> > with the Quit command, it is all working fine in 2003, but after migrating
> > it
> > to 2007, it no longer works and I am getting the error message as below. I
> > also tried using RunCommand -> Exit, and got the same error message too.
> >
> > My purpose is to have the Access database automatically close at the end
> > of
> > the macro. Does anyone know how to solve this issue?
> >
> > ******************************************
> > The command or action 'Quit' isn't available now.
> > *You may be in a read-only database or an unconverted database from asn
> > earlier version of Microsoft Office Access.
> > *The type of object the action applies to isn't currently selected or
> > isn't
> > in the active view.
> > Use only those commands and macro actions that are currently available for
> > this database.
> > ******************************************

>
>
>
> __________ Information from ESET Smart Security, version of virus signature database 4206 (20090701) __________
>
> The message was checked by ESET Smart Security.
>
> http://www.eset.com
>
>
>
>

 
Reply With Quote
 
Steve Schapel
Guest
Posts: n/a
 
      3rd Jul 2009

Hi Ally,

No, looks like you did it correctly. You are setting the folder as the
trusted location, so no need to reference individual files.

However, in the trusted locations dialog, there is a checkbox near the
bottom that says 'Allow trusted locations on my network'. Since you are
setting this up on a file server (which, ideally, you probably shouldn't
be), you may need to tick that box.

--
Steve Schapel, Microsoft Access MVP


"Ally Z" <(E-Mail Removed)> wrote in message
news:CB50A57D-EAF5-4844-A65E-(E-Mail Removed)...
> Hi Steven,
>
> I added the file pathes to the trust center using "Adding new location",
> but
> I am not sure if I did right. My databases are located on company's
> Intranet
> file server, for example the database is located at
> \\fileserver\access_automation\Ally Files\METRICS, then I added this path
> to
> the server to the trust center.
>
> Should add the full path including the file name to the trust center?
>




__________ Information from ESET Smart Security, version of virus signature database 4211 (20090702) __________

The message was checked by ESET Smart Security.

http://www.eset.com



 
Reply With Quote
 
Ally Z
Guest
Posts: n/a
 
      8th Jul 2009

hi Steve,

Actually I did check thebox for ''Allow trusted locations on my network',
and also listed my file server path to the User Locations, but it is still
not working.

any idea?

thanks,
--
Ally Z
MS Office Application Developer


"Steve Schapel" wrote:

> Hi Ally,
>
> No, looks like you did it correctly. You are setting the folder as the
> trusted location, so no need to reference individual files.
>
> However, in the trusted locations dialog, there is a checkbox near the
> bottom that says 'Allow trusted locations on my network'. Since you are
> setting this up on a file server (which, ideally, you probably shouldn't
> be), you may need to tick that box.
>
> --
> Steve Schapel, Microsoft Access MVP
>
>
> "Ally Z" <(E-Mail Removed)> wrote in message
> news:CB50A57D-EAF5-4844-A65E-(E-Mail Removed)...
> > Hi Steven,
> >
> > I added the file pathes to the trust center using "Adding new location",
> > but
> > I am not sure if I did right. My databases are located on company's
> > Intranet
> > file server, for example the database is located at
> > \\fileserver\access_automation\Ally Files\METRICS, then I added this path
> > to
> > the server to the trust center.
> >
> > Should add the full path including the file name to the trust center?
> >

>
>
>
> __________ Information from ESET Smart Security, version of virus signature database 4211 (20090702) __________
>
> The message was checked by ESET Smart Security.
>
> http://www.eset.com
>
>
>
>

 
Reply With Quote
 
John M
Guest
Posts: n/a
 
      8th Jan 2010
I am having the same problem with Quit and Set Warnings. I added the folder
where the database resides on C:\ to the trusted locations and it still will
not work.

"Ally Z" wrote:

> hi Steve,
>
> Actually I did check thebox for ''Allow trusted locations on my network',
> and also listed my file server path to the User Locations, but it is still
> not working.
>
> any idea?
>
> thanks,
> --
> Ally Z
> MS Office Application Developer
>
>
> "Steve Schapel" wrote:
>
> > Hi Ally,
> >
> > No, looks like you did it correctly. You are setting the folder as the
> > trusted location, so no need to reference individual files.
> >
> > However, in the trusted locations dialog, there is a checkbox near the
> > bottom that says 'Allow trusted locations on my network'. Since you are
> > setting this up on a file server (which, ideally, you probably shouldn't
> > be), you may need to tick that box.
> >
> > --
> > Steve Schapel, Microsoft Access MVP
> >
> >
> > "Ally Z" <(E-Mail Removed)> wrote in message
> > news:CB50A57D-EAF5-4844-A65E-(E-Mail Removed)...
> > > Hi Steven,
> > >
> > > I added the file pathes to the trust center using "Adding new location",
> > > but
> > > I am not sure if I did right. My databases are located on company's
> > > Intranet
> > > file server, for example the database is located at
> > > \\fileserver\access_automation\Ally Files\METRICS, then I added this path
> > > to
> > > the server to the trust center.
> > >
> > > Should add the full path including the file name to the trust center?
> > >

> >
> >
> >
> > __________ Information from ESET Smart Security, version of virus signature database 4211 (20090702) __________
> >
> > The message was checked by ESET Smart Security.
> >
> > http://www.eset.com
> >
> >
> >
> >

 
Reply With Quote
 
New Member
Join Date: Jun 2010
Posts: 1
 
      30th Jun 2010
I've tried SetWarnings off. I've tried everything I can think of but it keeps giving me the same issue when I want to quit.
 
Reply With Quote
 
New Member
Join Date: Aug 2010
Posts: 1
 
      21st Aug 2010
Hi,

I haven't found anything useful on this topic after about two hours of searching. What I do know I do know is that (in MS Access 2007) you can write a macro or VBA which exits the database w/o returning this error. Problem is that, when running in some other contexts, the error pops up again. I'm too lazy to try to figure out why but here is a workaround which seems to be working or me so far for a scenario in which I want a macro to run then close the database ( and MS Access) after it is finished. The basic idea is to create a wrapper macro to call the workhorse macro then the exit macro.

1. Macro1 = Workhorse macro = the stuff you wanted to get done.
2. Macro2 = The exit macro = runcommand/Quit or Exit
3. Macro3 = Wrapper macro = runmacro Macro1 then runmacro Macro2

Something about a parent macro calling the other two seems to set the context back to where it needs to be before exiting. I'm sure this could be accomplished with code too but have no idea what that would look like.

Hope this works for you.

Regards,

Keith
 
Reply With Quote
 
New Member
Join Date: Feb 2012
Posts: 1
 
      10th Feb 2012
I had the same issue using a 2003 mdb in 2010. I solved it this way:

I created a Function in a Module named xxxQuit() that had the single line
DoCmd.Quit acQuitSaveAll
where xxx was related to the module's function, but you could probably use AccessQuit() or something similar. I didn't want to use just Quit.

Then in your macro change the QuitAccess "command" to a RunCode command with the xxxQuit() function.
 
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
Access 2007 Macros - SendObject action, Message Text action argume rgille Microsoft Access Macros 8 28th Feb 2012 07:29 PM
RePost: The command or action quit isn't available now mccallen60 Microsoft Access 0 28th Apr 2010 01:43 PM
The command or action quit is available now mccallen60 Microsoft Access 0 26th Apr 2010 04:38 PM
Quit command in Access 2007 BethMc Microsoft Access Forms 6 17th Jun 2008 11:12 PM
DoCmd.Quit Error "The command or action 'Quit' isn't available now Syvers Microsoft Access Form Coding 1 20th Dec 2007 03:08 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 05:48 PM.