This class continues our exploration of Macros and
Event Handling. We will begin by learning how to create a
form that requires a password to open it. We'll use the
InputBox and the SetTempVar commands
to get the password, and then check that against the password stored in
the global system settings table with the DLOOKUP
command.
Next we'll learn how to
create a full sheet of the same customer label. I'll
show you two different methods. One uses a table with some bogus
temporary records in it, and is real easy to build, but fast to
implement. Another downside is that you can't edit the individual
labels.
The second method is more in-depth, and
requires more work, but allows you to actually edit each individual
label if you'd like to. You'll learn about the SendKeys
command, OpenTable, GoToRecord, how to loop
multiple times with the RunMacro command, and more.
Next we'll learn a new
method for displaying QUOTATION or INVOICE
on our printed report. Before we used a query with an IIF
statement, which is perfectly fine. But in this class I'll show you a
different way: using the Build Event of the report section and the
SetProperty command in a macro. This new method would
allow you to change the color, font, or other properties of the text as
well, instead of just the word itself.
Finally, we're going to
learn about Macro Groups and Submacros.
Macro groups are simply a way of organizing commands inside of a macro.
Submacros allow you to create separate mini macros inside of a big
macro. For example, if you want to have macros to open your forms, you
don't need to make a separate macro for EACH form. You can put them all
inside of submacros in an "OpenFormM" macro. This doesn't clutter up
your navigation pane.
This is the 4th class in the Access Advanced series. If you're
serious about building quality databases with Access, and you want to
learn how to automate your database with Macros
and Events, which is a good pre-cursor to VBA
programming then don't miss out on
this course. Of
course, if you have any questions about whether or not this class is
for you, please contact me.
Complete Outline - Access
Advanced Level
4
00. Intro (3:48)
01.
Password to Open Form (14:23)
InputBox to Collect Password
SettingT Table for Global Settings
SetTempVar to DLOOKUP Password
02.
Full Sheet of Same Customer Label 1 (9:02)
Non-Macro Method
Create Mailing Labels Using Wizard
Use Forms!CustomerF for Data
Set up Bogus Table for 30 Records
03.
Full Sheet of Same Customer Label 2 (20:22)
Individual Labels with SendKeys
Method
OpenTable Command
GoToRecord Command
SendKeys Command
Loop Method with External Macro
Create Label Form
SetValue Labels from Customer Form
RunMacro Command
Repeat Count to Loop
Repeat Expression |
04. New Method Quote v Invoice
(6:07)
Quote or Invoice Word on
Report
Build Event of Detail Section
SetProperty Caption
Make IsQuotation Invisible
05.
Macro Groups and Submacros (9:49)
Macro Group
Comment
Submacro
RunMacro MacroName.SubMacro
Default Macro Action
One Macro to Open Multiple Forms
06.
Review (3:59)
|
|