[AccessD] autokeys macros

McGillivray, Don DMcGillivray at ctc.ca.gov
Wed May 12 19:04:37 CDT 2021


Hi John,

I created a demo similar to Stuart's and started poking around.  I doubt that I have discovered the problem, but thought it worth passing it along just in case.

I named the sub-macros using "^" for CTRL and upper case characters.  I tested them from the keyboard using CTRL+the character.  All worked as expected.  Then I programmed a button on a form to use SendKeys instead of DOCMD.RUNMACRO, as your initial post indicated.

In my code, since I had used upper case characters in the macro names, I used them also in the string passed in to SendKeys (^Q, for example).  The macros wouldn't fire.  When I altered the strings so that they contained a lower case character (^q) instead, the macros DID fire.  

I also experimented with changing the case of the sub-macro names.  Regardless of the case on the macro name, only passing the hot-key in lower case worked for me.

Maybe yours is the same issue?



-----Original Message-----
From: AccessD <accessd-bounces+dmcgillivray=ctc.ca.gov at databaseadvisors.com> On Behalf Of Stuart McLachlan
Sent: Wednesday, May 12, 2021 2:12 PM
To: Access Developers discussion and problem solving <accessd at databaseadvisors.com>
Subject: Re: [AccessD] autokeys macros

You mean DOCMD.RUNMACRO Auttokeys? Seems a bit pointless!

But anyway - Office 2010:

Autokeys macro:
SubMacro ^Q - Action Messagebox "Q"
SUbMacro ^W Action Messagebox "W"

Button on a form.
btn-_On Click 
    DocmdRunMacro.Autokeys

Displays messagebox "Q" i.e. the first autokey.



On 12 May 2021 at 13:44, John Colby wrote:

> Can someone test running an autokeys macro in 2010 or later from 
> inside of a module?
> 
> It worked back in the day.  I am not getting it to work now.
> 
> I am running 2010.  I can get the macro to work when not in a module.
> -- John W. Colby Colby Consulting -- AccessD mailing list 
> AccessD at databaseadvisors.com
> https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdatabaseadvisors.com%2Fmailman%2Flistinfo%2Faccessd&data=04%7C01%7Cdmcgillivray%40ctc.ca.gov%7Ce26eb90c03984fadc1c008d9158a9d7a%7C78276a93cafd497081b54e5074e42910%7C0%7C0%7C637564507385149047%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=iMzMp29kp%2Bdf9fgTxc2r1eKVk%2ByoVr%2BdaXDMvXsMznw%3D&reserved=0 Website:
> https://gcc02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.d
> atabaseadvisors.com%2F&data=04%7C01%7Cdmcgillivray%40ctc.ca.gov%7C
> e26eb90c03984fadc1c008d9158a9d7a%7C78276a93cafd497081b54e5074e42910%7C
> 0%7C0%7C637564507385159000%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDA
> iLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=46KOJ
> 6FCy7JbLS%2FiKwfpYsNi64Nwi%2Fr3%2F%2FlDA8Uh6WQ%3D&reserved=0
> 


--
AccessD mailing list
AccessD at databaseadvisors.com
https://gcc02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdatabaseadvisors.com%2Fmailman%2Flistinfo%2Faccessd&data=04%7C01%7Cdmcgillivray%40ctc.ca.gov%7Ce26eb90c03984fadc1c008d9158a9d7a%7C78276a93cafd497081b54e5074e42910%7C0%7C0%7C637564507385159000%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=l8hTzXEWTknnTVGP5TVJB9onILq2wbp1n54FSjWnrEE%3D&reserved=0
Website: https://gcc02.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.databaseadvisors.com%2F&data=04%7C01%7Cdmcgillivray%40ctc.ca.gov%7Ce26eb90c03984fadc1c008d9158a9d7a%7C78276a93cafd497081b54e5074e42910%7C0%7C0%7C637564507385159000%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=46KOJ6FCy7JbLS%2FiKwfpYsNi64Nwi%2Fr3%2F%2FlDA8Uh6WQ%3D&reserved=0


More information about the AccessD mailing list