UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome to UtterAccess! Please ( Login   or   Register )

Custom Search
 
   Reply to this topicStart new topic
> Bypass Autokeys Not Working, Access 2016    
 
   
brucedodds
post Jul 3 2019, 03:09 PM
Post#1



Posts: 38
Joined: 11-June 08
From: Vancouver, WA


Hello All,

Last week I set up an Autokeys macro to disable the F11 key. While testing, I swear that I used the Shift key when needed to bypass this macro. (Microsoft confirms that you should be able to use the Shift key to bypass AutoKeys here.).

Today, using the Shift key to bypass AutoKeys is not working. To test, I imported the AutoKeys macro into a blank database. Still get the same result - F11 doesn't work regardless of whether I hold the Shift key down. This database does have the Use Access Special Keys option checked. F11 does work on databases without this Autokeys macro.

Has anyone encountered this before?

Thanks!

Bruce

Go to the top of the page
 
GroverParkGeorge
post Jul 3 2019, 03:28 PM
Post#2


UA Admin
Posts: 35,303
Joined: 20-June 02
From: Newcastle, WA


It would be helpful to see the actual coding in this macro....

But since you've already created a test accdb, can you upload it to review?

Compact & Repair the test accdb. compress it into a ZIP file and upload it here as an attachment.

Thanks.

--------------------
My Real Name Is George. Grover Park Consulting is where I do business.
How to Ask a Good Question
Beginning SQL Server
Go to the top of the page
 
theDBguy
post Jul 3 2019, 03:31 PM
Post#3


Access Wiki and Forums Moderator
Posts: 75,708
Joined: 19-June 07
From: SunnySandyEggo


Hi Bruce. I just gave it a try and wasn't able to bypass the autokeys macro. So, my guess is maybe it used to work in older versions of Access but may not anymore?

--------------------
Just my 2 cents... "And if I claim to be a wise man, it surely means that I don't know" - Kansas
Access Website | Access Blog | Email
Go to the top of the page
 
brucedodds
post Jul 3 2019, 03:40 PM
Post#4



Posts: 38
Joined: 11-June 08
From: Vancouver, WA


Here's the test file . . . I'll have to get NDAs from everyone . . .
Attached File(s)
Attached File  TestAutokeys.zip ( 16.21K )Number of downloads: 2
 
Go to the top of the page
 
GroverParkGeorge
post Jul 3 2019, 03:42 PM
Post#5


UA Admin
Posts: 35,303
Joined: 20-June 02
From: Newcastle, WA


NDA?

If you need an NDA from someone in order to look at it, let's delete it. We can't control who does or does not find and download it.

--------------------
My Real Name Is George. Grover Park Consulting is where I do business.
How to Ask a Good Question
Beginning SQL Server
Go to the top of the page
 
brucedodds
post Jul 3 2019, 03:43 PM
Post#6



Posts: 38
Joined: 11-June 08
From: Vancouver, WA


Hi DBGuy,

I believe I was using Access 2016 for development last week. Anyhow, the Microsoft article I linked to said it applied to Access 2016.

best,

Bruce
Go to the top of the page
 
brucedodds
post Jul 3 2019, 03:44 PM
Post#7



Posts: 38
Joined: 11-June 08
From: Vancouver, WA


That was a joke about the NDA. Sorry for the confusion.
This post has been edited by brucedodds: Jul 3 2019, 03:44 PM
Go to the top of the page
 
GroverParkGeorge
post Jul 3 2019, 03:45 PM
Post#8


UA Admin
Posts: 35,303
Joined: 20-June 02
From: Newcastle, WA


Well, we have to take that sort of thing seriously. So it's not a problem?

--------------------
My Real Name Is George. Grover Park Consulting is where I do business.
How to Ask a Good Question
Beginning SQL Server
Go to the top of the page
 
brucedodds
post Jul 3 2019, 03:46 PM
Post#9



Posts: 38
Joined: 11-June 08
From: Vancouver, WA


Here's the file again.
Attached File(s)
Attached File  TestAutokeys.zip ( 16.21K )Number of downloads: 2
 
Go to the top of the page
 
brucedodds
post Jul 3 2019, 03:46 PM
Post#10



Posts: 38
Joined: 11-June 08
From: Vancouver, WA


No, it's not a problem.
Go to the top of the page
 
isladogs
post Jul 3 2019, 05:39 PM
Post#11


UtterAccess VIP
Posts: 1,451
Joined: 4-June 18
From: Somerset, UK


As the article in your link states:
QUOTE
The new key assignments are available as soon as you save the macro group, and are in effect every time that you open the database. If you want, you can bypass the key assignments (and many other startup options) by holding down the SHIFT key while you start the database.


I've checked in both A2010 & A2019 (365) and it does exactly what the quote states
However, holding the shift key down does not prevent you running the Autokeys macro manually

I've slightly modified your database to make this more obvious:
- added a message box to show when F11 is pressed
- added an autoexec macro that runs your autokeys macro

Now you will see a message box 'F11 pressed' when you run the app ...unless you hold down the shift key
The Autokeys macro can still be run manually with or without using the SHIFT key

Hope that helps

BTW where was an NDA mentioned before George mentioned it?
Attached File(s)
Attached File  TestAutokeys_v2.zip ( 18.96K )Number of downloads: 1
 

--------------------
Go to the top of the page
 
GroverParkGeorge
post Jul 3 2019, 05:51 PM
Post#12


UA Admin
Posts: 35,303
Joined: 20-June 02
From: Newcastle, WA


I forgot to make the post visible again. I hid it pending confirmation of the potential issue.

--------------------
My Real Name Is George. Grover Park Consulting is where I do business.
How to Ask a Good Question
Beginning SQL Server
Go to the top of the page
 
isladogs
post Jul 3 2019, 06:04 PM
Post#13


UtterAccess VIP
Posts: 1,451
Joined: 4-June 18
From: Somerset, UK


Ah - thanks George - makes sense now!

--------------------
Go to the top of the page
 
brucedodds
post Jul 3 2019, 10:49 PM
Post#14



Posts: 38
Joined: 11-June 08
From: Vancouver, WA


Thanks for the test file, Isladogs. It confirms that the Shift bypass isn't working for Autokeys.

Oh, well, I guess I'll just have to let this go. Thanks for the feedback, everyone.
Go to the top of the page
 
isladogs
post Jul 4 2019, 02:22 AM
Post#15


UtterAccess VIP
Posts: 1,451
Joined: 4-June 18
From: Somerset, UK


QUOTE
Oh, well, I guess I'll just have to let this go.


Not necessarily ... depending on your purpose
As F11 is a standard keyboard shortcut in Access, you don't need Autokeys to make use of it.

If, for example, you want to disable it for certain users, that is possible by intercepting the key press and resetting the value to nothing.
To do so, use code such as

CODE
Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)

'OPTIONAL - Add some code here to check users permission level e.g.
If UserLevel<>"Admin" Then
     'disable F11 key
    If KeyCode = vbKeyF11 Then KeyCode=0
End If

End Sub


NOTE: You need to set the form KeyPreview property to Yes for this to work

--------------------
Go to the top of the page
 
gemmathehusky
post Jul 4 2019, 07:17 AM
Post#16


UtterAccess VIP
Posts: 4,722
Joined: 5-June 07
From: UK


Curious

I added another autokeys macros for shift[F11] +{F11} as well as the {F11} macro

Now F11 is toggling the navigation pane, but shift+F11 does nothing, well nothing visible.

--------------------
Dave (Male)

(Gemma was my dog)
Go to the top of the page
 
brucedodds
post Jul 7 2019, 04:49 PM
Post#17



Posts: 38
Joined: 11-June 08
From: Vancouver, WA


Thanks, Isladogs, for the suggestion. This system has 90 forms, so I don't think I'll use KeyDown.

Also, AutoKeys doesn't disable F11 when run manually.

I've added a form available only to certain Windows users that has a button that will pop open the ribbon and nav pane.
Go to the top of the page
 


Custom Search


RSSSearch   Top   Lo-Fi    16th July 2019 - 06:37 PM