A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

capture keypress on database open



 
 
Thread Tools Display Modes
  #1  
Old July 8th, 2009, 01:49 PM posted to microsoft.public.access.forms
cyberwolf0000 via AccessMonster.com
external usenet poster
 
Posts: 7
Default capture keypress on database open

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

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200907/1

  #2  
Old July 8th, 2009, 02:04 PM posted to microsoft.public.access.forms
cyberwolf0000 via AccessMonster.com
external usenet poster
 
Posts: 7
Default capture keypress on database open

Meant to put this in the VBA forums, sorry

Cyberwolf0000 wrote:
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

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200907/1

  #3  
Old July 8th, 2009, 02:20 PM posted to microsoft.public.access.forms
Klatuu
external usenet poster
 
Posts: 7,074
Default capture keypress on database open

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.
--
Dave Hargis, Microsoft Access MVP


"Cyberwolf0000 via AccessMonster.com" wrote:

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

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200907/1


  #4  
Old July 8th, 2009, 02:20 PM posted to microsoft.public.access.forms
Tom van Stiphout[_2_]
external usenet poster
 
Posts: 1,653
Default capture keypress on database open

On Wed, 08 Jul 2009 12:49:11 GMT, "Cyberwolf0000 via
AccessMonster.com" u42640@uwe wrote:

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
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.

  #5  
Old July 8th, 2009, 04:04 PM posted to microsoft.public.access.forms
cyberwolf0000 via AccessMonster.com
external usenet poster
 
Posts: 7
Default capture keypress on database open

thanks Tom,

Sounds like a much better way to go.

Tom van Stiphout wrote:
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]

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

Message posted via AccessMonster.com
http://www.accessmonster.com/Uwe/For...forms/200907/1

 




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 09:21 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.