Results 1 to 6 of 6
  1. #1
    IncidentalProgrammer is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Aug 2014
    Location
    Texas
    Posts
    156

    Programming Alt Commands for your Access Application (Not Access Itself)?

    I'm working on database for my department, and in our meeting yesterday, my boss asked if there was any way that I could make Alt commands in it; she likes to use the mouse as little as possible, and would like to be able to Alt-key the buttons and such. I've tried googling, but all I can find is information about the Alt commands for Access itself, and not how to set your own for your application. Is this something that can be done? Or would it interfere with Access since Access already has its own commands?

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    I use SendKeys as a last resort. It may work for you but I always try to develop my apps to work using Tab, Enter, and the Arrows. There is little need for the mouse. For instance, set the tab order of your form's controls so the focus of the cursor cycles through fields and ends on a series of Command Buttons. A commond button can execute code. It could launch a message box for user input or simply execute without a prompt.

    If you want to try SendKeys, here is some reference
    http://msdn.microsoft.com/en-us/libr...code-snippet-1

    Here is some code I use to simulate the Enter key being pressed.

    Code:
    Dim MyEnterKey As String
    MyEnterKey = "~"
    
    SendKeys MyEnterKey

  3. #3
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    Shortcut for buttons can be set by inserting & character in the button (or its associated label) caption. This will underscore the following character and that character in combination with Alt will be a shortcut to the button click. If there are no data entry controls on form to take focus (such as menu form with only buttons), pressing the Alt won't be necessary.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  4. #4
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 7 64bit Access 2010 32bit
    Join Date
    Aug 2013
    Posts
    7,862
    Quote Originally Posted by June7 View Post
    Shortcut for buttons can be set by inserting & character in the button (or its associated label) caption.
    That is a cool trick that I did not know about.

  5. #5
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    This means if you want to show an actual & character in the caption, it must be doubled.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  6. #6
    IncidentalProgrammer is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Aug 2014
    Location
    Texas
    Posts
    156
    That's awesome! Thanks so much!

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Access opens but commands dont work
    By tngirl in forum Access
    Replies: 2
    Last Post: 04-04-2014, 02:39 PM
  2. Replies: 4
    Last Post: 01-05-2014, 02:09 PM
  3. Sorting a Access field using Excel 2007 commands
    By Philosophaie in forum Access
    Replies: 2
    Last Post: 05-13-2013, 07:16 PM
  4. Programming a Report Card Application
    By mrovet in forum Programming
    Replies: 1
    Last Post: 06-16-2012, 02:11 AM
  5. Basic commands in Access 2007
    By johnkl49 in forum Access
    Replies: 2
    Last Post: 09-23-2010, 04:07 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums