Shift on Open Disable and Workaround

Shift on Open Disable and Workaround

Post by Mark » Fri, 03 Sep 2004 02:51:20


I already have the information on disabling using the Shift key on
startup and have incorporated it into one of my databases. To disable
it I have a couple buttons on the startup form that are only visible
to my login. These work fine but do require a restart.

I would prefer to be able to abort the Autoexec macro from command
line when starting the database. For example, using a shortcut on the
desktop that would include "/cmd ""Bypass""". Then include code in
the Autoexec macro like If Command = "Bypass" Then abort macro and
show database. Did this through RunCode and a function but when I do
it all I get is an empty Access frame on the screen. What do I need
to add to this to be able to have full access to the database or is it
not possible after using Shift at startup?

I would prefer this method since it will allow me to incorporate some
simple code into several of my databases.

Thanks for any help.
 
 
 

Shift on Open Disable and Workaround

Post by Steve Scha » Fri, 03 Sep 2004 03:59:43

Mark,

I don't think it is possible to mess with an AutoExec macro like this.

However, it may serve your purpose to re-name the AutoExec macro to
something else, and then run this macro from the "standard" desktop
shortcut using the /x macroname command line switch.

--
Steve Schapel, Microsoft Access MVP

 
 
 

Shift on Open Disable and Workaround

Post by Mark » Fri, 03 Sep 2004 14:38:08

Actually, the AutoExec portion works fine. If I enable the
ShiftBypassKey to test it, then it does exactly what I want. It opens
the startup form normally. But if I use the /cmd "Bypass" the coding
in RunCode allows me to bypass the open form.

The problem is when the AllowBypassKey is disable, I need a way to get
into the database elements. That seems to be the part that isn't
possible. It only allows me to be in an open form.

I guess I could use the AllowBypassKey enable in the code when I use
the /cmd "Bypass". Then close the database and restart it a second
time with the Shift key to give me access to everything. Then on a
normal startup disable the Shift again.

I looked through some of the Help and everything I found about startup
options all seem to take effect on the next startup, so having to
start twice seems the only option.

Thanks for the reply.

On Thu, 02 Sep 2004 06:59:43 +1200, Steve Schapel
 
 
 

Shift on Open Disable and Workaround

Post by Steve Scha » Fri, 03 Sep 2004 17:12:48

Mark,


Yes, apart from the solution I suggested.

--
Steve Schapel, Microsoft Access MVP