capture keypress on database open

  • Thread starter Cyberwolf0000 via AccessMonster.com
  • Start date
C

Cyberwolf0000 via AccessMonster.com

Is there a way to capture a keypress as a database is open. i.e. Access
knows when the shift key is help on open is bypasses the startup options. Is
there a way to do something similar? Like holding down the ctrl key when the
database opens? Basically I have a module that runs on start up and I
occasionally want to bypass this code when I open the database.

TIA.

--
James B Gaylord
For the Wolf comes the strength of the Pack,
For the Pack comes the strength of the Wolf,
-R. Kipling
Office 2003 on Win XP SP2
 
C

Cyberwolf0000 via AccessMonster.com

Meant to put this in the VBA forums, sorry
Is there a way to capture a keypress as a database is open. i.e. Access
knows when the shift key is help on open is bypasses the startup options. Is
there a way to do something similar? Like holding down the ctrl key when the
database opens? Basically I have a module that runs on start up and I
occasionally want to bypass this code when I open the database.

TIA.

--
James B Gaylord
For the Wolf comes the strength of the Pack,
For the Pack comes the strength of the Wolf,
-R. Kipling
Office 2003 on Win XP SP2
 
K

Klatuu

You don't have a module that runs. It is either a Sub or a Function.
Modules are only containers for Subs and Functions.

You can actually use the Shift key to do it. Instead of using the start
form option to start the code, use a macro named AutoExec and call your
Function using the RunCode Action. Note that the RunCode Action requires a
Function. It will not work with a Sub.
 
T

Tom van Stiphout

On Wed, 08 Jul 2009 12:49:11 GMT, "Cyberwolf0000 via

Not unless you go to extremes.

A much simpler solution would be to run an AutoExec macro, which opens
a form, which ticks a timer for 10 seconds, giving the user plenty of
time to click a Cancel button. If not clicked, the startup code fires.

-Tom.
Microsoft Access MVP
 
C

Cyberwolf0000 via AccessMonster.com

thanks Tom,

Sounds like a much better way to go.
Not unless you go to extremes.

A much simpler solution would be to run an AutoExec macro, which opens
a form, which ticks a timer for 10 seconds, giving the user plenty of
time to click a Cancel button. If not clicked, the startup code fires.

-Tom.
Microsoft Access MVP
Is there a way to capture a keypress as a database is open. i.e. Access
knows when the shift key is help on open is bypasses the startup options. Is
[quoted text clipped - 3 lines]

--
James B Gaylord
For the Wolf comes the strength of the Pack,
For the Pack comes the strength of the Wolf,
-R. Kipling
Office 2003 on Win XP SP2
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top