Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,194,062 members, 7,953,216 topics. Date: Thursday, 19 September 2024 at 12:35 PM

Simplified Guides On How To Build Macros In Ms Access 2010, 2013 And 2016 - Computers - Nairaland

Nairaland Forum / Science/Technology / Computers / Simplified Guides On How To Build Macros In Ms Access 2010, 2013 And 2016 (883 Views)

Ways To Filter A Database In Ms Access 2013 And 2016 / Introduction To Ms-powerpoint – Part 1 (versions 2007, 2010, 2013 And 2016) (2) (3) (4)

(1) (Reply)

Simplified Guides On How To Build Macros In Ms Access 2010, 2013 And 2016 by microsofttutor(m): 10:39am On Apr 28, 2017
What is Macro?
Macro is one of the objects of Microsoft Access database that is used to create actions that run sequentially i.e. in the order in which those actions are listed and they are of two types: Embedded and Standalone macros. Macro is used to add logic to your database and to automate repetitive tasks and to create more usable interfaces like the switchboard and other numerous tasks. Macros work hand in hand with Visual Basic and modules. In MS Access 2013 and above, you don’t really need an intense knowledge of Visual Basic coding to create a simple macro. In this tutorial part, I will give you the step by step guide of creating the various types of macros (embedded and standalone) and also show you how to run and debug them.
learn how to create macros in various versions of ms access

This is part 1 of chapter 8 of the Free Online Access Tutorial Series at Microsoft Tutorial website. In this part, I will explicitly explain how you can create and run macro in any version of MS Office Access.

In the previous chapter (Chapter 7) at http://www.microsofttut.com/2017/04/guides-to-create-mailing-labels-and-charts.html, I explained how to create professional reports, charts and mailing labels in any versions of MS Access in detail. Also see the full tutorial course content of this Microsoft Access Tutorial Series at http://www.microsofttut.com/2017/04/how-to-design-professional-reports-in-ms-excel.html.

GETTING STARTED WITH MACRO AND ITS FEATURES
The term macro is often used to refer to standalone macro objects (that is, the objects that you see under Macros in the Navigation Pane), but in reality, one macro object can contain multiple macros. In that case, it is referred to as a macro group.

A macro group is displayed in the Navigation Pane as a single macro object, but a macro group actually contains more than one macro. Of course, it is possible to create each macro in a separate macro object, but often it makes sense to group several related macros into a single macro object. The name in the Macro Name column identifies each macro.

A macro consists of individual macro actions. Most actions require one or more arguments. In addition, you can assign names to each macro in a macro group, and you can add conditions to control how each action is run. The following sections discuss each of these features in more detail.

Macro Names:
If your macro object contains only one macro, macro names are unnecessary. You can just refer to the macro by the name of the macro object. However, in the case of a macro group, you must assign a unique name to each macro. If the Macro Name column is not visible in the Macro Builder, click Macro Names in the Show/Hide group on the Design tab.

Arguments:
An argument is a value that provides information to the action, such as what string to display in a message box, which control to operate on, and so on. Some arguments are required, and some others are optional. Arguments are visible in the Action Arguments pane at the bottom of the Macro Builder.

The Arguments column was introduced into Access 2007, which allows you to view (but not edit) an action's arguments on the same line as the action. This makes it a little easier to read your macro because you no longer need to select each action to display its arguments. To display the Arguments column, click Arguments in the Show/Hide group on the Design tab.

Conditions:
A condition specifies certain criteria that must be met before an action will be performed. You can use any expression that evaluates to True/False or Yes/No. The action will not be executed if the expression evaluates to False, No, or 0 (zero). If the expression evaluates to any other value, the action will be run.

You can have one condition control more than one action by typing an ellipsis (...) in the Condition column for each subsequent action that you want the condition to apply to. If the expression evaluates to False, No, or 0 (zero), none of the actions are performed. If the condition evaluates to any other value, all of the actions are performed.

Macro Actions:
Actions are the basic building blocks of macros. Access provides a large number of actions from which to choose, enabling a wide variety of commands. For example, some of the more commonly used actions can open a report, find a record, display a message box, or apply a filter to a form or report.

Temporary Variables:
These three macro actions (SetTempVar, RemoveTempVar, and RemoveAllTempVars) allow you to create and use temporary variables in your macros. You can use these in conditional expressions to control running macros, or to pass data to and from reports or forms, or for any other purpose that requires a temporary storage place for a value. These temporary variables are also accessible in VBA, so you can also use them to communicate data to and from VBA modules.

Embedded Macros:
This gives you the ability to embed macros in any of the events provided by a form, report, or control. An embedded macro is not visible in the Navigation Pane; it becomes part of the form, report, or control in which it was created. If you create a copy of a form, report, or control that contains embedded macros, the macros are also present in the copy.

Standalone Macros:
From MS Access 2007 and later versions, a macro or macro group can be contained in a macro object (sometimes called a standalone macro), or a macro can be embedded into any event property of a form, report, or control. Embedded macros become part of the object or control in which they are embedded. Standalone macros are visible in the Navigation Pane, under Macros; embedded macros are not.

To Create a Simple Standalone Macro in MS Access:
Click http://www.microsofttut.com/2017/04/step-by-step-guides-to-create-macro-in-ms-access.html to study full tutorial with screen to screen images!

(1) (Reply)

I Need A Fairly Used Neat Laptop. / How To Stop Legitimate Emails From Being Flagged As Spam / School For Laptop Engineering

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 16
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.