Link to home
Start Free TrialLog in
Avatar of gkluk
gklukFlag for United Kingdom of Great Britain and Northern Ireland

asked on

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

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
Avatar of Anders Ebro (Microsoft MVP)
Anders Ebro (Microsoft MVP)
Flag of Denmark image

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.
User generated image
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:

User generated image
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 :) )
Curly brackets solves the problem for +{F2}   but not +{P} ....  same error.  Tried all sorts of combinations for +<SomeRegularKey>
Very ODD.
Avatar of gkluk

ASKER

@Anders, unfortunately it does not; I have already tried that (Shift seems to work fine with Function keys but not with individual ones).
In at least A2003 ... I used +<SomeKey> all the time.
Not sure when this got broken ... possibly when the Ribbon was introduced in A2007
SOLUTION
Avatar of DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
DatabaseMX (Joe Anderson - Former Microsoft Access MVP)
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of gkluk

ASKER

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