PC Review


Reply
Thread Tools Rate Thread

Bypass autoexec

 
 
=?Utf-8?B?TWFydGlu?=
Guest
Posts: n/a
 
      22nd Jun 2005
Hello,

I would like to write some code that will open a database using the
OpenCurrentDatabase method. However the database I am opening has an
autoexec macro that opens a form.

My questions is how can I bypass the autoexec using the OpenCurrentDatabase
method?

Many thanks - this site is invaluable it really is.

Martin
 
Reply With Quote
 
 
 
 
=?Utf-8?B?TmljaG9sYXMgU2NhcnBpbmF0bw==?=
Guest
Posts: n/a
 
      22nd Jun 2005
Could you maybe explain exactly what you're tryin' to do? Why do you need to
open up the second DB... is it possible to just import the data directly
without running the DB? Or do you need to run a specific function or query in
that second DB? If you need to import data you should be able to do that
without even opening the second DB.

"Martin" wrote:

> Hello,
>
> I would like to write some code that will open a database using the
> OpenCurrentDatabase method. However the database I am opening has an
> autoexec macro that opens a form.
>
> My questions is how can I bypass the autoexec using the OpenCurrentDatabase
> method?
>
> Many thanks - this site is invaluable it really is.
>
> Martin

 
Reply With Quote
 
=?Utf-8?B?TWFydGlu?=
Guest
Posts: n/a
 
      22nd Jun 2005
Hi,

I am deleting some forms and importing some new forms. That part I can do
but to do it I need to open the database and that is when the autoexec gets
in the way as the exec opens a form and runs some code.

Thanks,

Martin

"Nicholas Scarpinato" wrote:

> Could you maybe explain exactly what you're tryin' to do? Why do you need to
> open up the second DB... is it possible to just import the data directly
> without running the DB? Or do you need to run a specific function or query in
> that second DB? If you need to import data you should be able to do that
> without even opening the second DB.
>
> "Martin" wrote:
>
> > Hello,
> >
> > I would like to write some code that will open a database using the
> > OpenCurrentDatabase method. However the database I am opening has an
> > autoexec macro that opens a form.
> >
> > My questions is how can I bypass the autoexec using the OpenCurrentDatabase
> > method?
> >
> > Many thanks - this site is invaluable it really is.
> >
> > Martin

 
Reply With Quote
 
=?Utf-8?B?S2xhdHV1?=
Guest
Posts: n/a
 
      22nd Jun 2005
Just hold the shift key down while you open the database

"Martin" wrote:

> Hi,
>
> I am deleting some forms and importing some new forms. That part I can do
> but to do it I need to open the database and that is when the autoexec gets
> in the way as the exec opens a form and runs some code.
>
> Thanks,
>
> Martin
>
> "Nicholas Scarpinato" wrote:
>
> > Could you maybe explain exactly what you're tryin' to do? Why do you need to
> > open up the second DB... is it possible to just import the data directly
> > without running the DB? Or do you need to run a specific function or query in
> > that second DB? If you need to import data you should be able to do that
> > without even opening the second DB.
> >
> > "Martin" wrote:
> >
> > > Hello,
> > >
> > > I would like to write some code that will open a database using the
> > > OpenCurrentDatabase method. However the database I am opening has an
> > > autoexec macro that opens a form.
> > >
> > > My questions is how can I bypass the autoexec using the OpenCurrentDatabase
> > > method?
> > >
> > > Many thanks - this site is invaluable it really is.
> > >
> > > Martin

 
Reply With Quote
 
=?Utf-8?B?TWFydGlu?=
Guest
Posts: n/a
 
      22nd Jun 2005
Thanks Klatuu. I am am opening the database using code from another
database, I don't want to physically open the database itself.

"Klatuu" wrote:

> Just hold the shift key down while you open the database
>
> "Martin" wrote:
>
> > Hi,
> >
> > I am deleting some forms and importing some new forms. That part I can do
> > but to do it I need to open the database and that is when the autoexec gets
> > in the way as the exec opens a form and runs some code.
> >
> > Thanks,
> >
> > Martin
> >
> > "Nicholas Scarpinato" wrote:
> >
> > > Could you maybe explain exactly what you're tryin' to do? Why do you need to
> > > open up the second DB... is it possible to just import the data directly
> > > without running the DB? Or do you need to run a specific function or query in
> > > that second DB? If you need to import data you should be able to do that
> > > without even opening the second DB.
> > >
> > > "Martin" wrote:
> > >
> > > > Hello,
> > > >
> > > > I would like to write some code that will open a database using the
> > > > OpenCurrentDatabase method. However the database I am opening has an
> > > > autoexec macro that opens a form.
> > > >
> > > > My questions is how can I bypass the autoexec using the OpenCurrentDatabase
> > > > method?
> > > >
> > > > Many thanks - this site is invaluable it really is.
> > > >
> > > > Martin

 
Reply With Quote
 
=?Utf-8?B?S2xhdHV1?=
Guest
Posts: n/a
 
      22nd Jun 2005
That may be difficult in an external database. It can be done to the local
database in code (See AllowBypasskeys) in Access Help. Whether you can apply
this to an external database, I don't know. It would take some research and
testing to see if this will work.

"Martin" wrote:

> Thanks Klatuu. I am am opening the database using code from another
> database, I don't want to physically open the database itself.
>
> "Klatuu" wrote:
>
> > Just hold the shift key down while you open the database
> >
> > "Martin" wrote:
> >
> > > Hi,
> > >
> > > I am deleting some forms and importing some new forms. That part I can do
> > > but to do it I need to open the database and that is when the autoexec gets
> > > in the way as the exec opens a form and runs some code.
> > >
> > > Thanks,
> > >
> > > Martin
> > >
> > > "Nicholas Scarpinato" wrote:
> > >
> > > > Could you maybe explain exactly what you're tryin' to do? Why do you need to
> > > > open up the second DB... is it possible to just import the data directly
> > > > without running the DB? Or do you need to run a specific function or query in
> > > > that second DB? If you need to import data you should be able to do that
> > > > without even opening the second DB.
> > > >
> > > > "Martin" wrote:
> > > >
> > > > > Hello,
> > > > >
> > > > > I would like to write some code that will open a database using the
> > > > > OpenCurrentDatabase method. However the database I am opening has an
> > > > > autoexec macro that opens a form.
> > > > >
> > > > > My questions is how can I bypass the autoexec using the OpenCurrentDatabase
> > > > > method?
> > > > >
> > > > > Many thanks - this site is invaluable it really is.
> > > > >
> > > > > Martin

 
Reply With Quote
 
RD
Guest
Posts: n/a
 
      22nd Jun 2005
On Wed, 22 Jun 2005 12:07:05 -0700, Martin <(E-Mail Removed)>
wrote:

>Hello,
>
>I would like to write some code that will open a database using the
>OpenCurrentDatabase method. However the database I am opening has an
>autoexec macro that opens a form.
>
>My questions is how can I bypass the autoexec using the OpenCurrentDatabase
>method?
>
>Many thanks - this site is invaluable it really is.
>
>Martin


Take a look at this and see if it helps:
http://www.mvps.org/access/api/api0068.htm

Regards,
RD

 
Reply With Quote
 
David C. Holley
Guest
Posts: n/a
 
      23rd Jun 2005
Why are you doing this programically? Typically, one of the purposes of
an Autoexec is to help discourage the modification of objects.

Martin wrote:
> Hi,
>
> I am deleting some forms and importing some new forms. That part I can do
> but to do it I need to open the database and that is when the autoexec gets
> in the way as the exec opens a form and runs some code.
>
> Thanks,
>
> Martin
>
> "Nicholas Scarpinato" wrote:
>
>
>>Could you maybe explain exactly what you're tryin' to do? Why do you need to
>>open up the second DB... is it possible to just import the data directly
>>without running the DB? Or do you need to run a specific function or query in
>>that second DB? If you need to import data you should be able to do that
>>without even opening the second DB.
>>
>>"Martin" wrote:
>>
>>
>>>Hello,
>>>
>>>I would like to write some code that will open a database using the
>>>OpenCurrentDatabase method. However the database I am opening has an
>>>autoexec macro that opens a form.
>>>
>>>My questions is how can I bypass the autoexec using the OpenCurrentDatabase
>>>method?
>>>
>>>Many thanks - this site is invaluable it really is.
>>>
>>>Martin

 
Reply With Quote
 
=?Utf-8?B?TWFydGlu?=
Guest
Posts: n/a
 
      23rd Jun 2005
Thank you all.

I am bypassing the autoexec so I can update the forms. For everyone else I
want the autoexec to run on open.

I will try and get it working and copy the code to the replies if it works.

Thanks for your time once again.

Martin

"RD" wrote:

> On Wed, 22 Jun 2005 12:07:05 -0700, Martin <(E-Mail Removed)>
> wrote:
>
> >Hello,
> >
> >I would like to write some code that will open a database using the
> >OpenCurrentDatabase method. However the database I am opening has an
> >autoexec macro that opens a form.
> >
> >My questions is how can I bypass the autoexec using the OpenCurrentDatabase
> >method?
> >
> >Many thanks - this site is invaluable it really is.
> >
> >Martin

>
> Take a look at this and see if it helps:
> http://www.mvps.org/access/api/api0068.htm
>
> Regards,
> RD
>
>

 
Reply With Quote
 
David C. Holley
Guest
Posts: n/a
 
      23rd Jun 2005
If its a matter of distributing new forms or objects, I would have the
DB with the autoexec handle copying the new objects. That way you don't
have to deal with bypassing the Autoexec. If you've got a split db, you
can set things up to have code check to see wether or not new objects
exist and if so which ones need to be copying. It might be as simple as
creating a table - tblNewObjects with a two fields - txtObjectName,
txtObjectType that lists the objects to copy.


Martin wrote:
> Thank you all.
>
> I am bypassing the autoexec so I can update the forms. For everyone else I
> want the autoexec to run on open.
>
> I will try and get it working and copy the code to the replies if it works.
>
> Thanks for your time once again.
>
> Martin
>
> "RD" wrote:
>
>
>>On Wed, 22 Jun 2005 12:07:05 -0700, Martin <(E-Mail Removed)>
>>wrote:
>>
>>
>>>Hello,
>>>
>>>I would like to write some code that will open a database using the
>>>OpenCurrentDatabase method. However the database I am opening has an
>>>autoexec macro that opens a form.
>>>
>>>My questions is how can I bypass the autoexec using the OpenCurrentDatabase
>>>method?
>>>
>>>Many thanks - this site is invaluable it really is.
>>>
>>>Martin

>>
>>Take a look at this and see if it helps:
>>http://www.mvps.org/access/api/api0068.htm
>>
>>Regards,
>>RD
>>
>>

 
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
RE: Shift key doesn't bypass autoexec - HELP! KARL DEWEY Microsoft Access Macros 0 8th Mar 2010 04:04 PM
How to bypass autoexec using OpenCurrentDatabase Shaun Microsoft Access VBA Modules 3 26th Jul 2005 05:08 PM
autoexec.nt file lost (c:/windows/system32/autoexec.nt-this progr =?Utf-8?B?Q29icmE0Mw==?= Windows XP Games 0 24th Sep 2004 08:57 PM
Re: AutoExec doesn't autoexec Steve Schapel Microsoft Access Macros 0 18th Jun 2004 07:25 PM
Bypass autoexec Jim Tinder Microsoft Access Security 1 16th Sep 2003 08:31 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:41 PM.