This class
picks up where
Expert Level 15
left off. We are continuing our work with Action Queries. Today we will
begin by creating a macro that will run multiple queries at one time,
so we can automate the process of archiving our contacts. With one click
we can turn warnings off, run the append query, run the delete query,
turn warnings back on, and use the MessageBox command to display a
"finished" message.

Next we'll learn about running delete queries based on multiple
tables. For example, you want to delete all of the contacts for
customers in a specific state. The records you're deleting are in the
contacts table, but the criteria is based on the customer table. How do
you handle this?

In Lesson 3 we will begin learning about Make Table Queries.
These can be used to actually create a new table based on data from
another table or query. We will create a customer mailing list table
that has only specific customers in it based on specific criteria. Then
we will learn how to create a backup of our customer table in a
separate database file (real handy for quick backups).

Next, we'll deal with a very common problem that I get asked about all
the time. You have a table with a child (let's say a school student)
with multiple parents who may or may not live together. You need to be
able to send separate mailings home to each parent. How do you
handle this? I'll show you one technique using a make table query and an
append query with two parents, then I'll show you another multi-table
solution allowing for unlimited parents.

Finally, we'll learn about UNION queries, which allow us to take
multiple tables (or other queries) and combine them into a single
dataset to look like one query. So far we've split the contacts up so
that old contacts get archived in a separate table. What if you want to
temporarily put them back together so you can search on the whole set of
contacts? That's a good job for a UNION query, a special type of query
that can only be created in SQL view.

This is the 16th class in the Access Expert series.
There's a lot of great material in this class. Learning Action Queries will add tremendous power to your databases. Of
course, if you have any questions about whether or not this class is
for you, please contact me.

Complete Outline - Access Expert Level
16
00. Intro (8:25)
01. Macro to Run Multiple Queries (9:21)
Command Button Wizard
Open Query
Delete Queries Not Listed
Archive Contacts Button
Macro Builder
OpenQuery Command
Add New Action
Show All Actions
SetWarnings On/Off
MessageBox Command (MsgBox)
02. Delete Query Multiple Tables (8:56)
Referential Integrity
Delete Queries and Cascade Deletes
Delete Contacts from Customers in CA
Two Queries Needed
Customer By State Query
03. Make Table Queries (16:05)
Create a Customer Mailing List Table
Make Table Query in Same Database
Create a new blank database ACCDB file
Make Table Query into a Different Database
Backup Customer Table
Multi-Valued Fields Not Allowed
Long Text with Append Only Property On
Automated Backup of Contact Table
Include in Command Button Macro
OpenQuery Command |
04. Multiple Parent Mailing List (18:25)
Create Student Table with 2 Parents
Include In Mailings Field
Make Table Parent 1
Append Parent 2
Show Another Example Relational
Use a Query with a Join
05. UNION Query (10:30)
Merge Contacts with Archive
Don't use the Union button
UNION SQL statement
Homework Assignment
06. Review (7:25) |

|