Microsoft Access 2010 Bible

(Rick Simeone) #1

xxviii


Contents


Developing Custom Access Ribbons ................................................................................1023
The ribbon creation process ..................................................................................1023
Using VBA callbacks ..............................................................................................1023
The Ribbon Hierarchy .....................................................................................................1025
Getting Started with Access Ribbons ...............................................................................1026
Step 1: Design the ribbon and build the XML ........................................................1026
Step 2: Write the callback routines ........................................................................1027
Step 3: Create the USysRibbons table ....................................................................1029
Step 4: Add XML to USysRibbons .........................................................................1030
Step 5: Specify the custom ribbon property ...........................................................1032
The Basic Ribbon XML ....................................................................................................1033
Adding Ribbon Controls .................................................................................................1035
Specifying imageMso .............................................................................................1035
The Label control ..................................................................................................1037
The Button control ................................................................................................1038
Separators .............................................................................................................1038
Check boxes ..........................................................................................................1039
The DropDown control .........................................................................................1040
The SplitButton Control ........................................................................................1041
Using Visual Web Developer ...........................................................................................1042
Managing Ribbons ..........................................................................................................1045
Completely Removing the Access Ribbon ........................................................................1046
Summary ........................................................................................................................1047

Chapter 30: Using Access Macros . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1049
An Introduction to Macros ..............................................................................................1049
Creating a macro ...................................................................................................1050
Assigning a macro to an event ...............................................................................1052
Multi-Action Macros .......................................................................................................1054
Submacros ......................................................................................................................1057
Conditions ......................................................................................................................1061
Opening reports using conditions .........................................................................1061
Multiple actions in conditions ...............................................................................1064
Temporary Variables .......................................................................................................1065
Enhancing a macro you’ve already created ............................................................1065
Using temporary variables to simplify macros .......................................................1066
Using temporary variables in VBA .........................................................................1068
Error Handling and Macro Debugging ............................................................................1069
The OnError action ...............................................................................................1071
The MacroError object ..........................................................................................1073
Debugging macros.................................................................................................1074
Embedded Macros ..........................................................................................................1075
Macros versus VBA Statements ........................................................................................1077
Choosing between macros and VBA ......................................................................1078
Converting existing macros to VBA .......................................................................1078
Summary ........................................................................................................................1081

02_475348-ftoc.indd xxviii02_475348-ftoc.indd xxviii 4/1/10 1:42 PM4/1/10 1:42 PM

Free download pdf