D davey3389 Registered User. Local time Today, 21:02 Joined Jul 16, 2012 Messages 30 Jul 22, 2012 #1 Can anyone tell me if there is a code i can enter than when i press F9 on the keyboard it opens a form
Can anyone tell me if there is a code i can enter than when i press F9 on the keyboard it opens a form
John Big Booty AWF VIP Local time Tomorrow, 06:02 Joined Aug 29, 2005 Messages 8,262 Jul 22, 2012 #2 You can use the KeyDown event to detect a key press, some code in that event along the lines of; Code: If KeyCode = 120 Then DoCmd.[URL="http://msdn.microsoft.com/en-us/library/office/aa220276%28v=office.11%29.aspx"]OpenForm[/URL] "YourFormName" End If
You can use the KeyDown event to detect a key press, some code in that event along the lines of; Code: If KeyCode = 120 Then DoCmd.[URL="http://msdn.microsoft.com/en-us/library/office/aa220276%28v=office.11%29.aspx"]OpenForm[/URL] "YourFormName" End If
D davey3389 Registered User. Local time Today, 21:02 Joined Jul 16, 2012 Messages 30 Jul 22, 2012 #3 Thanks can you explain why F9 is key code 120
John Big Booty AWF VIP Local time Tomorrow, 06:02 Joined Aug 29, 2005 Messages 8,262 Jul 22, 2012 #4 davey3389 said: Thanks can you explain why F9 is key code 120 Click to expand... I have no idea, it just is
davey3389 said: Thanks can you explain why F9 is key code 120 Click to expand... I have no idea, it just is
John Big Booty AWF VIP Local time Tomorrow, 06:02 Joined Aug 29, 2005 Messages 8,262 Jul 22, 2012 #5 If you want to find out the value of a key use; Code: MsgBox KeyCode In the Key Down event.
D davey3389 Registered User. Local time Today, 21:02 Joined Jul 16, 2012 Messages 30 Jul 22, 2012 #6 Where do i enter the code so it works from any part of the database
John Big Booty AWF VIP Local time Tomorrow, 06:02 Joined Aug 29, 2005 Messages 8,262 Jul 22, 2012 #7 The Key Down event is specific to forms. So you will need at least one form open for this code to work.
The Key Down event is specific to forms. So you will need at least one form open for this code to work.
bob fitz AWF VIP Local time Today, 21:02 Joined May 23, 2011 Messages 4,807 Jul 22, 2012 #8 In the Key Down event of a form, as John said in his earlier post. If the form has any controls, I think you will need to set the forms Key Preview property to Yes. Sorry John, I got distracted and missed your last post.
In the Key Down event of a form, as John said in his earlier post. If the form has any controls, I think you will need to set the forms Key Preview property to Yes. Sorry John, I got distracted and missed your last post.
John Big Booty AWF VIP Local time Tomorrow, 06:02 Joined Aug 29, 2005 Messages 8,262 Jul 22, 2012 #9 No problem bob, you've added a little move info that I had not thought to mention
bob fitz AWF VIP Local time Today, 21:02 Joined May 23, 2011 Messages 4,807 Jul 22, 2012 #10 John Big Booty said: No problem bob, you've added a little move info that I had not thought to mention Click to expand... Yes, started with "I think" though, because I was not 100% sure I was right
John Big Booty said: No problem bob, you've added a little move info that I had not thought to mention Click to expand... Yes, started with "I think" though, because I was not 100% sure I was right
D davey3389 Registered User. Local time Today, 21:02 Joined Jul 16, 2012 Messages 30 Jul 22, 2012 #11 so i can enter the code in one form to open another form
D davey3389 Registered User. Local time Today, 21:02 Joined Jul 16, 2012 Messages 30 Jul 22, 2012 #12 what would the change be to run a macro instead
John Big Booty AWF VIP Local time Tomorrow, 06:02 Joined Aug 29, 2005 Messages 8,262 Jul 22, 2012 #13 You'd need; Code: If KeyCode = 120 Then DoCmd.RunMacro "YourMacroName" End If