Home
Username:
Password:
Microsoft Certified Application Specialist (MCAS) Tutorials

Queries / Macros & Coding




Visitors to VTC.com will be able to view all introductory videos for each training course.
Free Trial Members will gain access to first three chapters for each training course.
Full Access Members have full access to VTC.com’s entire library of video tutorials.


Learn More

Subtitles of the Movie

Macros and Modules are automation features in Access 2007. I am on the Create Tab and I'm going over to the other Ribbon. Here's where you will see an icon for Macro. You will not be tested on the creation of modules and macros. You'll need to be aware of them, however, so in this video I'll take you through a very simple macro. First, Modules and Class Modules are for coding. They're used by developers. They allow us to put together a collection of functions and of procedures. Class Modules allows us to create those as templates. In a Module we can attach it to an individual report or form or any object usually on an individual basis. In a Class Module, we open it up for use throughout the entire database itself. Do not worry about knowing the difference between Modules and Class Modules or knowing how to actually create them. You will not be tested on this in the examination. Macros are a way that we can actually automate an individual command. If I select Macro to create a new macro, I am brought to an Action Screen. If I go to the pull-down, there's a variety of commands. Now again, remember, you will not be test on this. It's simply for you to understand what the macro does. In this case I'm going to choose the Action Go to Record. You'll notice that it automatically defaults to Next. When you're creating forms within Microsoft Access, this is the default. I'm going to Order Details Entry. When I open it to put a new record in, it automatically shows me the first record. The difficulty here is during data entry I could accidentally overwrite this information and it leaves all this information on the screen, which is not secure. What I'm going to do in the macro is create a macro that allows the record to go to a new record. By creating a macro that opens to a new record, I will not see any data on the screen. This is all I need to do within this example is simply Save Go to Record. When I go to Close, it'll ask me if I want to save the design of the macro and I'll say Yes. Now, I've already created one called New so I'm simply going to call this one New and put in the word Record with it also. Keep in mind that we don't like to use spaces or special characters when we're dealing with coding and our field names, et cetera. I'm going to say OK and I now have created the macro. If I go to the Navigation Pane, you will see that there is a macro section on the bottom of the screen. Here is where I have the new record that I just created and some other macros that I had created earlier. The macro does not affect this form yet. I have to attach it. I am going to go to Design View and in Design View to the Property Sheet. On the Property Sheet I am going to look for the function called On Open. These are different commands where the macro will run. On Open, run the macro called New or New Record. On Close, I could run another macro. Right now we'll run New Record and I'm going to simply go back to the Form View. Notice now that the form has opened with no information showing. The records are all here. I can simply go back to the previous record. You can quickly see why this is a nice feature to have in Microsoft Access. It really helps us automate tasks and make life easier.

Tutorial Information

Course: Microsoft Certified Application Specialist (MCAS)
Author: Lauri Sowa-Matson
SKU: 33988
ISBN: 1-935320-41-6
Release Date: 2009-04-30
Duration: 9.5 hrs / 127 lessons
Work Files: Yes
Captions: Available on CD and Online University
Compatibility: Vista/XP/2000, OS X, Linux
QuickTime 7, Flash 8

VTC Sign up & Benefits

  • Unlimited Access
  • 98,729 Video Tutorials (23,265 free)
  • Video Available as Flash or QuickTime
  • Over 1026 Courses
  • $30 for One Month Access
  • Multi-User Discounts Available