IT tutorials
 
Technology
 

Sharepoint 2013 : Developing Applications with Access - Access Services (part 2) - Database Components - Data Macros

10/23/2013 2:29:01 AM
- Free product key for windows 10
- Free Product Key for Microsoft office 365
- Malwarebytes Premium 3.7.1 Serial Keys (LifeTime) 2019

4.6 Data Macros

Data macros are the business logic workhorses of Access web apps, capable of adding, editing, or deleting data records. Data macros come in two flavors, embedded or stand alone. Embedded macros are stored in SQL Server as AFTER triggers on the tables that they are attached to, where they react to the types of data events shown in Table 3.

TABLE 3: Data Macro Events

EVENT TYPE TRIGGER
On Insert Fires when a new record is added to the table
On Update Fires when an existing record is modified
On Delete Fires when an existing record is deleted

To add or edit a table-bound data macro, open the relevant table in Access, and click one of the Events on the Design tab on the Ribbon. Events that are highlighted already have a macro applied. Figure 5 shows an embedded Data macro used by the Invoices table to display the internal ID of a record on the Invoice view’s read-only ID field.

FIGURE 5

image

Data macros also support a stand-alone version of a macro that is designed to promote code reuse. A stand-alone macro is visible in the Access navigation pane but is not directly executable by an Access web app’s end users. Stand-alone data macros are stored in SQL Server as stored procedures and can be invoked by other UI or data macros using the RunDataMacro action. To create a stand-alone macro, click the Advanced button in the Create section of the Home tab on the Ribbon, and select Data Macro. Notice that this type of macro can accept parameters.

4.7 User Interface Macros

A User Interface macro is embedded in UI elements such as buttons and other web controls and is used to react to application events like On Click. Figure 3 in the “Customizing Views” section shows the control Actions button as a pop-up lightning bolt. Table 4 lists the available UI events.

TABLE 4: User Interface Macro Events

EVENT TYPE TRIGGER
After Update Fires after data has been entered or selected by the control
On Click Fires when the control is selected
On Current Fires when the user changes records in the view
On Load Fires when a view is opened

Not all UI controls expose all the supported events. For example, a Button exposes an On Click event, but a Combo Box exposes only the After Update event.

UI macros also support a stand-alone type of macro that is stored in the SQL Server database as a stored procedure to define reusable logic. Similar to stand-alone data macros, stand-alone UI macros are visible in the Navigation pane in the Access client but are not directly executable. Stand-alone UI macros can be executed only by calling them from an embedded UI macro with the RunMacro command.

4.8 On Start Macros

On Start macros are used to set up an application, including the setting of default values for variables, navigating to default views, or creating targeted messages. To create a stand-alone macro, click the Advanced button in the Create section of the Home tab on the Ribbon, and select On Start Macro.

 
Others
 
- Sharepoint 2013 : Developing Applications with Access - Access Services (part 2) - Database Components - Customizing Views, Macros
- Sharepoint 2013 : Developing Applications with Access - Access Services (part 1) - Database Components - Tables and Queries
- Windows Server 2012 : Planning, Migrating, and Maintaining WINS - Exploring WINS and DNS Integration
- Windows Server 2012 : Planning, Migrating, and Maintaining WINS - Upgrading a WINS Environment
- Windows Server 2012 : Installing and Configuring WINS (part 2) - Examining WINS Replication
- Windows Server 2012 : Installing and Configuring WINS (part 1) - Configuring Push Partners
- Windows Server 2012 : Secure DNS with DNSSEC - Configuring a DNSSEC Zone
- SQL Server 2008 : DBCC validation - Controlling CHECKDB impact
- SQL Server 2008 : DBCC validation - Preventing and detecting corruption
- SQL Server 2008 : DBCC validation overview
 
 
Top 10
 
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
Technology FAQ
- Is possible to just to use a wireless router to extend wireless access to wireless access points?
- Ruby - Insert Struct to MySql
- how to find my Symantec pcAnywhere serial number
- About direct X / Open GL issue
- How to determine eclipse version?
- What SAN cert Exchange 2010 for UM, OA?
- How do I populate a SQL Express table from Excel file?
- code for express check out with Paypal.
- Problem with Templated User Control
- ShellExecute SW_HIDE
programming4us programming4us