How can I use the Autokeys macro with keystrokes of the type Shift and key in Access 2016?

gkluk
gkluk used Ask the Experts™
on
Dear All,

I am trying to set up an Autokeys macro in Access 2016 so that it responds to the keystroke Shift and P. I am setting up the submacro name as +P but I am getting a message saying that the key or key combination +P in Autokeys has invalid syntax or is not alowed (although I have seen it in a few books and tutorials). Could someone please advise how can I use Shift+P in Autokeys?

Regards,
George
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
The below screenshot is an example of a AutoKeys macro that uses Shift-F2 to open a custom zoom form (you can see the zoomform on my blog if interested). I don't know if simply adding the curly brackets around the P would make it work, but worth a try.
Autokeys
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database Architect / Application Developer
Top Expert 2007

Commented:
I cannot get +<AnyKey> to work for Shift. Error message in all cases.
This is somehow broke.
In at least A2003 ... I had a lot of +<SomeKey>

Meanwhile  ^<AnyKey>  works fine for Control

When you try to Save the AutoKeys Macro ... you get this error message:

error
Your screenshot seems to be using regular parenthesis (), not the curly ones {}. Have you tried with the curly ones? (I don't know if they have an official name in english :) )
Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

DatabaseMX (Joe Anderson - Microsoft Access MVP)Database Architect / Application Developer
Top Expert 2007

Commented:
Curly brackets solves the problem for +{F2}   but not +{P} ....  same error.  Tried all sorts of combinations for +<SomeRegularKey>
Very ODD.

Author

Commented:
@Anders, unfortunately it does not; I have already tried that (Shift seems to work fine with Function keys but not with individual ones).
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database Architect / Application Developer
Top Expert 2007

Commented:
In at least A2003 ... I used +<SomeKey> all the time.
Not sure when this got broken ... possibly when the Ribbon was introduced in A2007
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database Architect / Application Developer
Top Expert 2007
Commented:
I just reported this as a bug ... waiting for response.

@gkluk .... what Version  of Access is this ?  (I'm in A2016 CTR

Also confirmed this in A2010 desktop
Software Design Engineer
Commented:
This is not a bug, and the behavior has been this way since at least Access 2007.  I have not verified with Access 2003.

The help topic for Autokeys is here: https://support.office.com/en-us/article/Run-an-Access-macro-by-using-a-keyboard-shortcut-0D267570-D3DA-46EB-9BFB-A3C81AF676BE
It says "These keyboard shortcuts are a subset of the syntax that is used in the SendKeys statement in Microsoft Visual Basic."
And has a list of examples that do work.

It doesn't explicitly say this, but Shift is support ONLY for function keys.

You could request a change in this area via https://access.uservoice.com/, and you could give feedback on the documentation page if you would like to see the documentation updated to more explicitly specify what combinations are supported.

Shane
Access Engineering
DatabaseMX (Joe Anderson - Microsoft Access MVP)Database Architect / Application Developer
Top Expert 2007

Commented:
Thanks Shane ...

Author

Commented:
@DataBaseMX, I am on Access 2016. It would be good if the documentation included some sort of what is allowed, or a history with references on when things got changed and why as it could be quite demanding and time consuming to find when things changed.
@Shane it might be working as expected by the developer, but a little more documentation would have helped I believe.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial