One of the most time consuming activities in Access involves positioning and aligning controls on a form. Try the following example to create a Macro that provides simple shortcut keys for aligning controls.
- Create a new Macro and save it with the name AutoKeys. Make the Macro Name column visible by clicking View > Macro Names on the menu.
- In the first row of the Macro Name column, enter ^L (i.e. a caret and an L.) The caret refers to the Ctrl key in Access. In the Action column, choose the RunCommand action.
- Next, click the Action Argument Command for the RunCommand action, and choose the command AlignLeft.
- Proceed back to the the second row of the macro. Enter ^R under Macro Name, and choose RunCommand for the Action. Choose AlignRight for the Command Action Argument.
- Add two more rows to the macro: ^T for AlignTop, and ^B for AlignBottom
- Save the macro.
You can now align a selection of controls by pressing Ctrl followed by the appropriate assigned shortcut key.