Results 1 to 4 of 4
  1. #1
    2 Star Lounger
    Join Date
    Jan 2003
    Location
    Dallas, Texas
    Posts
    139
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Adding a Quick Key to a Macro (Access 2000)

    I have a macro I am quite happy with, but I failed to add a shortcut key when I wrote it. Is there a way to add a Quick Key after you have completed the macro? <img src=/S/crossfingers.gif border=0 alt=crossfingers width=17 height=16>

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Adding a Quick Key to a Macro (Access 2000)

    Access is different in this respect than Word and Excel, you can't assign a shortcut key to a macro the way you can there, through the Customize... dialog. But there are several alternatives:

    If you want to assign a shortcut key to execute a macro throughout the database, create a dedicated macro named AutoKeys. Make sure you view Macro Names when editing this macro. Macro names in the AutoKeys macro are keystrokes designated as in the VBA instruction SendKeys, for example:

    <table border=1><td>Notation</td><td>Meaning</td><td>{F9}</td><td>Function key F9</td><td>+{F3}</td><td>Shift+F3</td><td>%{Enter}</td><td>Alt+Enter</td><td>^{Tab}</td><td>Ctrl+Tab</td></table>
    If you want to assign a shortcut to a macro for just one form, handle it in the KeyDown or KeyStroke event of that form, and set the Key Preview property of the form to Yes.

  3. #3
    2 Star Lounger
    Join Date
    Jan 2003
    Location
    Dallas, Texas
    Posts
    139
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Adding a Quick Key to a Macro (Access 2000)

    Hmm -- . I have to confess I'm not sure I understand this. You write a Macro called Autokeys that defines a key (combination of keys) that runs the macro you want a short cut for. Is that close to what you said? How would that make things faster? The Macro I want to run more quickly is an Append macro that adds a newly created table to the master table then deletes the appended table.

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Adding a Quick Key to a Macro (Access 2000)

    The AutoKeys macro is opened automatically when you open the database; all shortcut key assignments stored in AutoKeys will be available as long as the database is open. You don't have to run AutoKeys. So if you wish to assign a shortcut key to your Append macro, set the Macro Name column in AutoKeys to the code for the shortcut key, set the Action to RunMacro, and select the name of your append macro in the lower part of the macro window. When you save the macro as AutoKeys, the shortcut key will be available.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •