Ms-Access Advanced VBA Programming Techniques, Tips and Tricks.

Keyboard Shortcuts

Keyboard Shortcuts are very useful, if practiced and memorized, for frequently used actions without shifting back and forth between mouse and keyboard. Microsoft Access has an extensive list of Keyboard Shortcuts to make our work much easier. You can enter the search term Keyboard Shortcuts on the Help Menu to get a category-wise list. I have selected some of them and given at the end of this Post for reference.

If you look carefully on the MS-Access Menu Options you can find one letter in each Menu Item is underlined indicating that it is a Keyboard Shortcut Code.

For example: the letter E in Edit menu is underlined indicating that you can open the Edit Menu using ALT+E Keyboard Shortcut. Most of the Options within the Edit Menu also have keyboard shortcut Codes at the right side of each one.

When we design Forms we can define our own custom Keyboard Shorts (Access Keys) on the Form Controls in a similar way with the help of & symbol. If you insert & symbol at the left side of a character in the Caption of the Command Button (or in the Caption of a Label) you can use ALT+character to make the Command Button act as if it is being clicked and runs the action programmed into that Button.

For example: If you have a Command Button on a Form with the Caption Export you can write the Caption as &Export; so that ALT+E Keyboard Shortcut can be used to run the Export action. When we define keyboard shortcuts this way we should see that it is not ending up with the same built-in Shortcuts. Here, we already have a Built-in Keyboard Short &Edit;, which uses ALT+E. We can insert the & symbol to the left side of any letter within the word Export (like Ex&port for ALT+P) to avoid conflict with the built-in codes.

There are other methods to define Keyboard Shortcuts. You can put all your Custom Keyboard Shortcuts in a Macro for specific actions, like Print Previewing/Printing Report, for opening a Particular Form in Design View or Normal View, Run a Macro to Process Report Data etc. You must name the Macro as Autokeys. An image of the Example Macro is given below.

The first line Action OpenReport runs when the CTRL+O keys are used, CTRL+K runs another Macro.

If you assign an action to a key combination that is already being used by MS-Access (for example, CTRL+C is the key combination for Copy), the action you assign this key combination replaces the Access key assignment. A List of Key combination that you can use in your Autokeys Macro is given below.

Key Codes for Autokey Macro
Key Code Key Press
^A or ^4 CTRL+A or CTRL+4
{F1} F1
^{F1} CTRL+F1
+{F1} SHIFT+F1
{INSERT} INS
^{INSERT} CTRL+INS
+{INSERT} SHIFT+INS
{DELETE} or {DEL} DEL
^{DELETE} or ^{DEL} CTRL+DEL
+{DELETE} or +{DEL} SHIFT+DEL

If you want a Macro to run automatically when you open a database, name the Macro as Autoexec.

A list of useful general purpose Keyboard Shortcuts are given below for your reference.

Seq Key Strokes Action
SAVING AND PRINTING
1. CTRL+S or SHIFT+F12 or ALT+SHIFT+F2 To save a Database Object
2. F12 or ALT+F2 To open the Save As... dialog box
3. CTRL+P To Print the Current or Selected Object
FINDING REPLACING
4. CTRL+F To open the Find tab in the Find and Replace dialog box (Datasheet view and Form view only
5. CTRL+H To open the Replace tab in the Find and Replace dialog box (Datasheet view and Form view only)
6. SHIFT+F4 To find the next occurrence of the text specified in the Find and Replace dialog box when the dialog box is closed (Datasheet view and Form view only)
WORKING IN DESIGN VIEW
7. F2 To switch between Edit mode (with insertion point displayed) and Navigation mode
8. F4 To switch to the property sheet (Design view in forms and reports in databases and Access projects)
9. F5 To switch to Form view from form Design view
10. F6 To switch between the upper and lower portions of a window (Design view of tables, macros, and queries and the Advanced Filter/Sort window only)
11. SHIFT+F7 To switch from the Visual Basic Editor to form or report Design view
12. ALT+V+P To open property sheet for a selected object
Editing Controls in Form and Report Design View
13. CTRL+C To copy the selected control to the Clipboard
14. CTRL+X To cut the selected control and copy it to the Clipboard
15. CTRL+V To paste the contents of the Clipboard in the upper-left corner of the selected section
16. CTRL+RIGHT ARROW To move the selected control to the right
17. CTRL+LEFT ARROW To move the selected control to the left
18. CTRL+DOWN ARROW To move the selected control down
19. SHIFT+DOWN ARROW To increase the height of the selected control
20. SHIFT+RIGHT ARROW To increase the width of the selected control
21. SHIFT+UP ARROW To reduce the height of the selected control
22. SHIFT+LEFT ARROW To reduce the width of the selected control
WINDOW OPERATIONS
23. F11 To bring the Database window to the front
24. CTRL+F6 To cycle between open windows
25. ENTER To restore the selected minimized window when all windows are minimized
26. CTRL+F8 To turn on Resize mode for the active window when it's not maximized; press the arrow keys to resize the window
27. ALT+SPACEBAR To display the Control menu
28. SHIFT+F10 To display the shortcut menu
29. CTRL+W or CTRL+F4 To close the active window
30. ALT+F11 To switch between the Visual Basic Editor and the previous active window
MISCELLANEOUS
31. F7 To check spelling
32. SHIFT+F2 To open the Zoom box to conveniently enter expressions and other text in small input areas
33. ALT+ENTER To display a property sheet in Design view
34. ALT+F4 To quit Microsoft Access, close a dialog box, or close a property sheet
35. CTRL+F2 To invoke a Builder

Share:

7 comments:

  1. Who knows where to download XRumer 5.0 Palladium?
    Help, please. All recommend this program to effectively advertise on the Internet, this is the best program!

    ReplyDelete
  2. Hey

    Really glad to get into this forum
    It's what I am looking for.
    Hope to know more member here.

    ReplyDelete
  3. Sorry. Does someone realize how to define true EA from fraudulent and a true Forex signals from fake? sorry for inconvinience

    ReplyDelete
  4. Thanks very good for report, I follow your blog

    ReplyDelete
  5. nice to be here.... thanks for share

    ReplyDelete
  6. Great article, i

    hope can know much information About it!

    ReplyDelete
  7. [...] Autokey macro, check this http://msaccesstips.com/2007/12/keyboard-shortcuts/ __________________ If this resolves your issue, please use the Thread Tools and mark the thread [...]

    ReplyDelete

Trending

Popular Posts

Search This Blog

Blog Archive

Powered by Blogger.

Labels

Forms How Tos MS-Access Security Functions Reports Animations msaccess animation msaccess forms Utilities msaccess controls Access and Internet MS-Access Scurity MS-Access and Internet Queries External Links msaccess reports msaccess tips Menus and Toolbars Accesstips MsaccessLinks Process Controls Art Work Downloads msaccess How Tos Graph Charts msaccessQuery List Boxes Command Buttons Emails and Alerts Query Combo Boxes Custom Wizards msaccess graphs msaccess reporttricks ms-access functions msaccessprocess security advanced Access Security DOS Commands Data Macros Menus Property Report Top Values VBA msaccess email msaccess menus progressmeter Access2007 Array Auto-Number Command Button Join Microsoft Numbering System Records Security Split SubForm Table Utility Workgroup database msaccess functions msaccess wizards Access2003 Accounting Year Action Animation Attachment Binary Numbers Budgeting Calculation ChDir Color Palette Conditional Formatting Controls Copy Custom Functions Data Filtering Data Type Defining Pages Diagram Disk Dynamic Lookup Error Handler Excel Export Expression External Field Type Fields Filter Form Form Instances Formatting Groups Hexadecimal Numbers Import Labels List Logo Macro Mail Merge Main Form Memo Methods Monitoring Object Reference Objects Octal Numbers Operating System Paste Primary-Key Product Rank Reading Rich Text Sequence SetFocus Summary Tab-Page Time Difference Union Query User Users Variables Water-Mark Word automatically commands function hyperlinks iSeries Date iif ms-access msaccess msaccess alerts pdf files reference restore switch text toolbar tutorial updating upload vba code

Featured Post

Important Notice

Dear Readers, Very sorry to inform you that I am finding it difficult to renew my contract with the Hostgator Hosting Plans to continue prov...

Labels

Blog Archive

Recent Posts