Hey Friends,
MS Access 2010.
Does anyone know of a way to execute Code (or even a Macro) by using a Keyboard Shortcut? For example, if I have a block of Code (or a Macro) that were to check for new data updates (or ANYTHING--that is just a "fer example"), but I wanted to be able to execute it from anywhere within a Project (and at any time) by simply hitting, for example, Ctrl-Shift-Q .
I'm just exploring new ideas and possibilities, and this one came to mind as potentially being very useful for what I want to do.
Thank for all your hepp!
I just found out how. Create a macro called AutoKeys. Give it a submacro with the name of the submacro being your key combination (^ for Ctrl, + for Shift) and have its action be whatever you need. This is called AutoKeys if you want to google it. I got it to work with Ctrl + Q, but I couldn't get Ctrl + Shift + Q to work. You may have to play with that.
12 9293
I don't know of a way to set a program level keyboard shortcut like that, but you can use the KeyUp event on each form to call your code. Just set the form's Key Preview property to Yes and test for the key code combination. - If (Shift And acCtrlMask) > 0 And (Shift And acShiftMask) > ) And KeyCode = vbKeyQ Then
This assumes a Form is open and with the focus. It seems like a potential option. I'm looking for anytime the DB is opened, with no forms being open (i.e., if the Back End is opened), such that I could run code to take away Navigation Pane and override the ByPass Key, but, then still be allowed to reverse it, all using shortcut keys.
Hmmmmmmmmmmmmm..
Thanks, Seth!
I just found out how. Create a macro called AutoKeys. Give it a submacro with the name of the submacro being your key combination (^ for Ctrl, + for Shift) and have its action be whatever you need. This is called AutoKeys if you want to google it. I got it to work with Ctrl + Q, but I couldn't get Ctrl + Shift + Q to work. You may have to play with that.
Just got the Ctrl + Shift + Q key combination to work. Enter +^{Q} as the submacro name.
I'll play around with it a bit. Thanks for the info!
Seth,
You are absolutely THE MAN!!!! This is the coolest thing I've discovered yet. Now, when I want to protect my data files, I just run a shortcut key macro that removes the nav pane, disallows the bypass key and prevents all the menus, then I close the DB and VOILA!! To unlock it all, I just execute another shortcut key!
Yes, I am sure there are still ways to get around it, but most people will just simply get discouraged and walk away when all they see is an absolutely blank Access DB window.
Thanks so much, Seth! I'll put this into every DB I create from now on!
I might put it in my apps too, but as a user tool to open specific forms from anywhere. Thanks for making me think to look for an answer like that :)
I read that article when I was looking into the topic. However, Access 2010 (and 2013 I think) are very different in how Macros are built, so that article didn't help me build the macro. I'll see if I can find what article I used.
Here is the link that told me how to do it: autokeys 2010 NeoPa 32,556
Expert Mod 16PB
I'm a little confused by that Seth. It may well be that the way to create macros is somewhat changed, but the explanation for what is required within the macro hasn't.
John Viescas (is very clever actually.) tells how to set up the macro originally and includes a couple of examples for specific keys, but only the other link gives a good reference of what to use to do what across the board. The details for that haven't changed for many versions as far as I can tell.
You are correct that what is required within the macro is the same, but the creation is very different and I couldn't get to the content stage with just what was in your link. Part of it is that it doesn't explain what it is trying to do, so I couldn't figure out how to do that in the new version.
NeoPa 32,556
Expert Mod 16PB
Well, both links are available now and you found your answer in the end so we're all good and well done :-)
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Spartanicus |
last post by:
Some use the kbd element (Example: <kbd>Ctrl</kbd>+<kbd>G</kbd>) to mark
up keyboard shortcuts, but the spec defines kbd as: "Indicates *text* to
be entered by the user." (emphasis mine).
UA...
|
by: ekta |
last post by:
How do we write the code for Keyboard shortcuts in asp.net(c#).Is it
possible through javascript only or there is any method/property availaible
(like Accesskey) in asp.net.
Thanks
|
by: bob lambert |
last post by:
Hi,
I have a vb .net std 2002 windows form app and wanted to
use keyboard shortcuts (& in text property input)
It shows up on the design view, but when I build (in
debug mode) and display the...
|
by: Helene Day |
last post by:
Sorry, this could be a newby question... but how do we do the keyboard
shortcuts in .NET
buttonname.text = "&Click Me"
Does not give the short cut Alt-C for the button.
Helene
|
by: Henry |
last post by:
I have a listBox on my form. When the listBox has focus I want to respond
to certain keyboard shortcuts like Ctrl+A that is used to select all
contents as in Word, but I want to apply this to the...
|
by: Erland |
last post by:
Hello,
I am using asp.net 2.0 and I want to add keyboard shortcuts to my
application just like the shortcuts you see in GMAIL. I was wondering
how can I do this in ASP.NET? Scenerio that would...
|
by: Zytan |
last post by:
I cannot use & to implement a keyboard shortcut on a TabPage like I
can on a Button. Is there a way to easily do this? Maybe TabPages
aren't supposed to have keyboard shortcuts, but it would be...
|
by: Xah Lee |
last post by:
http://xahlee.org/emacs/modernization.html
]
The Modernization of Emacs
----------------------------------------
THE PROBLEM
Emacs is a great editor. It is perhaps the most powerful and...
|
by: Bob Alston |
last post by:
Are there any keyboard shortcuts that you routinely disable in you apps,
to avoid users getting wierd results or problems? If so, what are they?
And what technique do you use to disable them?
...
|
by: Gilbert Tordeur |
last post by:
Hello,
Context = Web site with VB2008.
Is it possible to define keyboard shortcuts on a webpage, to make it
possible for the user to "click" on a button or a link, or to set the focus
on a...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
| |