Learn Microsoft Access Advanced Programming Techniques, Tips and Tricks.

Embedded Macros in Access2007

There is only one difference between the stand alone Macros and embedded macro; they will not appear in the navigation pane under Macros Group.  They are written directly on Forms/Reports or on their control's event property.  When you make a copy of the Form or Report the embedded macros goes along with it.

Let us try and find out how embedded macros are created?

  1. Open Microsoft Access2007.
  2. Open a Report in Design View.
  3. Press F4 or Alt+Enter to display the Property Sheet of the Report.
  4. Click on the Event Tab of the Property Sheet.
  5. Click on the On Load Event Property to select it.
  6. Click on the Build (. . .) button at the right side of the property.
  7. The Macro Builder option is already in selected state, Click OK Command Button to accept it.

    The Macro is open in Design View.  Title bar of the macro indicates Catalog:Report:On Load (the Report Name:Object Type:Event Type) where the macro will be embedded. 

  8. Select MsgBox Action and type my Embedded Macro in the Message Action Argument.
  9. Type On Load Info in the Title Argument of MsgBox Action.
  10. Click on the Close Toolbar button to save and close the Macro.
  11. Save and Close the Report.
  12. Right-Click on the Report in the navigation pane and select Open to open the Report in Report View.  The embedded macro will run and you will see the message.
  13. You can modify the macro by following steps 2 to 6.  You can add several actions in the Macro if needed.
Share:

No comments:

Post a Comment

Comments are subject to moderation, before publishing.

Translate



PageRank
Subscribe in a reader
Your email address:

Delivered by FeedBurner

Search

Popular Posts

Search This Blog

Blog Archive

Powered by Blogger.

Follow by Email

Labels

Forms How Tos Functions MS-Access Security Reports msaccess forms Animations msaccess animation Utilities msaccess controls Access and Internet MS-Access Scurity MS-Access and Internet Queries Array External Links msaccess reports msaccess tips Accesstips Class Module Menus and Toolbars MsaccessLinks Process Controls Art Work Downloads Objects Property msaccess How Tos Graph Charts msaccessQuery Collection Object Combo Boxes List Boxes VBA Command Buttons Data Emails and Alerts Event Query Calculation Controls Custom Wizards DOS Commands Data Type Dictionary Object Form WithEvents ms-access functions msaccess functions msaccess graphs msaccess reporttricks Command Button Object Reference msaccessprocess security advanced Access Security Add Custom Functions Field Type Form Instances Item Key Macros Menus Report Top Values Variables msaccess email msaccess menus progressmeter Access2007 Auto-Number Copy Expression Fields Join Methods Microsoft Numbering System RaiseEvent Records Recordset Security Split SubForm Table Time Difference Utility Workgroup Wrapper Classes database msaccess wizards tutorial Access2003 Accounting Year Action Animation Attachment Binary Numbers Bookmarks Budgeting ChDir Color Palette Conditional Formatting Data Filtering Defining Pages Diagram Disk Dynamic Lookup Error Handler Excel Export External Filter Formatting Groups Hexadecimal Numbers Import Labels List Logo Macro Mail Merge Main Form Memo Monitoring Octal Numbers Operating System Paste Primary-Key Product Rank Reading Remove Rich Text Sequence SetFocus Summary Tab-Page Tables Union Query User Users Water-Mark Word automatically commands function hyperlinks iSeries Date iif ms-access msaccess msaccess alerts pdf files reference restore switch text toolbar updating upload vba code

Featured Post

Access Form Control Arrays and Event-3

This is the continuation of last Week’s Topic on Text Box AfterUpdate and LostFocus Event capturing and performing Validation Checks on val...

Labels

Blog Archive

Recent Posts