Datasheet

Book IV
Chapter 1
Publishing Access
Applications
615
Figure 1-4:
You can
create a
two-level
navigation
bar.
Macros
Access 2010 provides a new and improved Macro Builder — also referred to
as the Macro Designer — to allow you to add logic to your database to auto-
mate repetitive tasks and create a more usable interface. Using the Macro
Builder you can quickly define conditions and actions for your macros.
When you’re creating Web macros, the Macro designer filters out actions
and expressions that don’t translate to Access Services, taking much of the
guess work out of creating macros and ensuring that the publishing pro-
cess is as easy and efficient as possible. The designer allows you to expand
and collapse the macro data in much the same way you’d expand and col-
lapse the elements of an XML file. When a macro appears in expanded view
it looks very similar to viewing code. Figure 1-5 shows an example of the
zzzEraseOrders macro from the Northwind Traders sample Access Web
database from Microsoft. The macro is being viewed in design view using the
Macro Builder. The Action Catalog appears on the right side from which you
can drag and drop the conditional statements and corresponding actions as
needed.
The In This Database node in the Action Catalog allows you to view all the
macros you’ve already created in the current database, in addition to other
objects in the database such as tables, forms, and reports. You can reuse the
logic created from other macros by simply dragging and dropping them from
this node onto your new macro.
Follow these steps to create a macro:
1. Open your Web database application in Access 2010.
2. On the Create tab, in the Macros & Code group, click Macro.
Clicking the Macro command launches the Macro Builder, which you
can use to build your business logic.
Designing SharePoint-Compatible Access Databases
31_587164-bk04ch01.indd 61531_587164-bk04ch01.indd 615 9/30/10 8:09 PM9/30/10 8:09 PM