Microsoft Access 204
Intermediate Access 4
Designing a Letter Writer,
Access Macros, Events, OnDblClick Event, Refresh Macro, Much More.
AC204 Major Topics
- Letter Writer
- Macro Basics
- On Double Click Event
- Refresh Macro
- Report Formatting
In this class we will begin
designing our Letter Writer system. With our letter writer, we'll
be able to actually type letters and other correspondence into our
contact management system and print them out in a letter or memo format
to mail or fax to our customers.
We'll begin by developing a query that only
shows the current contact record. We'll use this query to feed our
report that lets us print out the letter. We'll use the technique we
learned in a previous class to get the Contact ID value from the open
Now that we have the query built, we can build the
Contact Letter Report. We'll format this report to look like a
normal letter, with the customer's name and address and the body of the
letter ready to mail.
Next we'll place a Print As Letter button
on our form so that we can print the letter right up.
We'll learn about what it means when records are
Dirty - or in the process of being edited, and how this hurts our
database... we can't directly print a letter now until we manually save
the data to the table. We'll need something more powerful.
In lesson three, we'll begin to learn about
Macros. We'll make a couple of real simple macros just to teach you
how they work - and how we can make them repeat automated tasks. We'll
make a simple macro just to beep at you.
Then we'll make a macro that's a little
more complicated. It will open a form, beep, open a table, and then tell
you "I'm done now, Master!"
Next, we'll make a macro that will allow us to
open up the current customer record from the contact form. We will
assign this macro to the On Dbl Click event (on double-click) in
our customer combo box. This means the user just has to double-click on
the combo box to open up that customer. Real powerful stuff!
Now that we've learned about macros, we can
actually make a macro to refresh the current contact record
before printing it - assuring us that the data is saved in the table
before printing. We'll learn how to make a command button that runs a
Once we're done with the macros, we'll actually
get into making our letter report look good. We'll start by
making some new fields to concatenate our name fields and address
We'll learn how to automatically adjust the
vertical spacing of fields on our forms and reports.
We'll talk about the margins of the page,
and making sure you set the report at it's optimal width.
We'll put the company logo and our return
address in the page header...
This class begins to take our contact
management system and use it for correspondence as well. We'll do
more with this in coming classes - including a mass-mailing form
and letter as well. We also begin to learn about Macros, which
are the stepping stone to Visual Basic programming. Don't miss