Create a Shortcut to run an event in a form - Microsoft Community


hello.

i want press keyboard shortcut (ctrl+shift+?) run event. right now, have click button.

private sub btnunknown_click()
me.txtstatus= "unknown"
end sub

is there way press (ctrl+shift+?) in order make me.txtstatus= "unknown"?

thanks

this works me:

'------ start of code ------

    

private sub form_keydown(keycode integer, shift integer)

    debug.print keycode

    if keycode = 191 then
        if (shift , (acctrlmask or acshiftmask)) then
            me.txtstatus = "unknown"
        end if
    end if

end sub

'------ end of code ------

however, possible key code associated question mark may vary depending on keyboard layout, mapped system's regional settings.  don't know if problem or not.



Office / Access / Windows 10 / Office 365 Home



Comments

Popular posts from this blog

Getting ErrorCode: 120018 when trying to access Microsoft account - Microsoft Community

The message was sent to a distribution list ‎(DL)‎ - Microsoft Community

What is the Office 365 default group Mailbox Users ISV Access Enabled - Microsoft Community