120 likes | 235 Views
L. L Line. Access. 2007. The L Line. The Express Line to Learning. © Wiley Publishing. 2007. All Rights Reserved. Automating Access with Macros. 11. Stations Along the Way. * Learning to automate with macros * Programming without coding * Creating a Switchboard
E N D
L L Line Access 2007 The L Line The Express Line to Learning © Wiley Publishing. 2007. All Rights Reserved.
Automating Access with Macros 11 Stations Along the Way * Learning to automate with macros * Programming without coding * Creating a Switchboard * Using a macro group * Putting on the finishing touches
Adding Macros to Your Toolkit Macros… • Help you perform repetitive tasks • Work with Access forms, reports, queries, and tables • Have a base in Visual Basic for Applications (VBA) • Automatically interface with VBA (programming savvy not required!) • Are easy to build and use
Types of Macros Embedded: • Are part of a form or report • Often appear as command buttons Stand-alone: • Exist as independent database objects • Can be executed from a form, report, or control • Appear in the left navigation pane
The Classic Switchboard • Acts as the database’s index page • Usually consists of a form with buttons • Offers user navigation to all other forms and reports • Typically opens with the database • Can contain an Exit button
Building a Switchboard • Start with the Switchboard Manager under Database Tools • Add action-related buttons as Switchboard entries • Avoid too many entries on one Switchboard form • Design to separate entries by function • Edit like any other form in Layout View or Design View
Multi-Step Macros • Can be embedded or stand-alone • Are single macros that perform multiple, sequential steps • Require a defined data source
Macro Groups • Contain named, stand-alone macros • Save related macros in a single file • Organize macros by function or usage • Require a group plus individual naming convention Group_Name.Macro_Name
Macro Finishing Touches • Close Access: Adds a professional touch • RunApp: Runs an external application from within Access • AutoExec: Automatically executes when a database opens
Discussion Topics • Why should I use macros? • How do I create a Switchboard? • Can I run external applications and programs from within Access? • What’s the best type of macro to use? • What’s the difference between embedded and stand-alone macros?