Access 2007-2016
Access 2000-2003
Access Seminars
TechHelp Support
Tips & Tricks
Access Forum
Course Index
Topic Glossary
Insider Circle
Home   News   Tips   Glossary   Templates   Forums   Help   Logon   Order   Contact Us  

< Previous: Access Expert 15

Next: Access Expert 17 >

Access Expert Level 16

Expert Microsoft Access Tutorial - 1 Hour, 19 Minutes
This Microsoft Access video tutorial picks up where Expert Level 15 left off. In this class we will continue to learn how to use Action Queries. We will start by creating a macro to run multiple queries at once, and we'll learn about make-table and union queries. Topics include:
  - Macro to Run Multiple Queries
  - Delete Query on Multiple Tables
  - Referential Integrity with Delete Queries
  - Make Table Queries
  - Backup Table to Another Database
  - Multiple Parent Student Mailings
  - Include Multiple Parents in Mailings
  - UNION Queries
  - Merge New Contacts with Archived Ones

Order Now

If you would like a preview of what's covered in this class,
click here to watch the first and last lessons of this course (free of charge), or scroll down for more information.


Access Expert Level 16
Description: Access Expert Level 16
Versions: Recorded with Access 2013. Also use with 2007 and 2010. The lessons on embedded macros are valid for Access 2007 and later only. Access 2003 users should get Access 223.
Pre-Requisites: Access Expert Level 15 strongly recommended
Running Time: 1 Hour, 19 Minutes
Cost: $24.99

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)


Keywords: Multi Query Macro, Make Table Query, Union Query, microsoft access tutorial, microsoft access tutorial, microsoft access training, access 2007, access 2010, access 2013, macro, command button, delete query, macro builder, openquery, show all actions, add new action, messagebox, setwarnings, make table query, backup to different database, multi-valued fields, mailings to multiple parents, union query, sql

Student Interaction: Microsoft Access Expert 16

Richard on 11/10/2013:  Microsoft Access Expert Level 16 is 1 hour, 19 minutes long. In this class we will continue to learn how to use Action Queries. We will start by creating a macro to run multiple queries at once, and we'll learn about make-table and union queries. Topics include: - Macro to Run Multiple Queries - Delete Query on Multiple Tables - Referential Integrity with Delete Queries - Make Table Queries - Backup Table to Another Database - Multiple Parent Student Mailings - Include Multiple Parents in Mailings - UNION Queries - Merge New Contacts with Archived Ones Click here for more information on Access Expert Level 16, including a course outline, sample videos, and more. This course was recorded using Access 2013, but is also valid for Access 2007 and 2010 users. This class follows Expert Level 15. The next class in the series is Expert Level 17.
Janet Gangl on 11/18/2013: 1) Will you be covering Crosstab Queries in the Expert series?
2)When will the Advanced series be available?
3) Will you be covering importing data from other sources such as excel

Reply from Richard Rost:

1. Yep - very soon.
2. Can't say for sure; lots of Expert stuff to cover still.
3. Yep.

Robert Jacoby on 8/13/2014: Time Index approx 4:40

You explain how to create a macro to run queries. However I am trying to create a macro that opens a make table query in design view and then open the dialog box so I can select another data base in which to create a new table. Or even better automatically select the name of the data base referenced in a form.

I cannot seem to find a command to do so.

Is this something with which you can help me?

Richard Wilson on 8/22/2014: I wrote yesterday a question about making a junction table. I have the data I need to join in an existing table, BUT the ID number for one set of the data is the principal key. I need to change that ID number. Seems I can make a new table with the data I need, add a new Principal Key and then alter the ID's in the new table that were the Principal Key in the existing table. ?

Reply from Richard Rost:

What do you mean by "Principal Key?" Is this a PRIMARY KEY or a FOREIGN KEY?

Richard W on 8/26/2014: Primary Key. I figured it out. In the original tables, one was a Primary Key but in the junction table it was not. I got it done.
Scar on 9/18/2014: I would like to copy multi fields from one table to another table with the selection from only one combobox. where can I find info on this.

Reply from Richard Rost:

What do you mean by "copy fields?" Are you trying to select values in one list box and copy them over to a second list box?

Lynda Chase on 10/13/2014: Richard Rost - you my friend are a legend - exactly the info I need to create my phonebook :)
Chris Thompson on 2/8/2015: Around 5:00 you speak of the Union Query button not working or not sure. I have also found it is broken and did the same thing as you have shown - SQL only. The reason for my stating this is to also state that it is broken (or behaves the same) in both Access 2007 and 2010 as well.

Reply from Alex Hedley:

Thanks for confirming it in 2007/2010

Michael on 3/15/2015: Hi Richard/Alex,
Our homework assignment from Expert 15 was to turn the Set Warnings off, run the append query, run the delete query and then turn Set Warnings back on. I'm not sure why, but I cannot activate the "Show All Actions" command in the Macro Ribbon to adjust the Set Warnings. My database is saved in a trusted folder. I'm not having any luck finding help on the Internet - can you help me?

Reply from Alex Hedley:

Sounds like you've covered the necessary steps.
When you open the db is there a warning that you need to enable?

MS Article: Macro Action

Article 2

Michael on 3/15/2015: On my previous question about the Set Warnings, I wanted to let you know that I am using Access 2013 and I do have the database saved in a trusted location. Thanks again for your help.
Michael on 3/16/2015: Hi Alex, No, there aren't any warnings that challenge me when I open the PC database. (I don't have to enable anything.)

Reply from Alex Hedley:

Can you try with a blank new database also in the trusted location.

Other options are reinstalling or making sure Access is up to date.

Michael on 3/18/2015: Alex - Amazing! I opened a blank database and put a command button on a blank form. I was able to activate "Show All Actions." I wonder if the issue is that I started the PC database in Access 2007 and imported it into Access 2013? No worries. I plan to take all of the courses over again, so I'm sure it'll work when I start the DB from scratch in 2013. Thanks for your help! M.

Reply from Alex Hedley:

Maybe, 2007 was very buggy! Stay away if you can help it.

Clarice Barkhordarian on 8/27/2015: The State in my CustomerT is 2 letters in Caps but in the new table it changes to lower case. Why is that? and how can I change that?
Clarice Barkhordarian on 8/27/2015: Sorry, I figured out what it was. In my CustomerT for the State I have input mask = >L?? that was not transferred to the new table.
Stephen Egan on 11/24/2015: I am working on the homework for Expert 16. I tried to run the OrderBackupMakeTableQ and received a message Calculated Columns are not allowed in Select Info statements. I checked the fields in OrderT. It looks like DayToShip is the problem as it is a calculated field. I am not sure how to handle this. I don't think I can change is like we did with the Notes field in CustomerT. I need a clue on how to handle this

Reply from Alex Hedley:

You can just remove that Field from your Query.

Katheryn Hartig on 3/29/2016: At 3:38 you had 3 CA customers in the CustomerT but at 3:52 when you ran the query, only 2 CA customers displayed...?

Reply from Alex Hedley:

Did the Query have a criteria on it?


You may want to read these articles from the 599CD News:


Visual Basicindex
Account Login
Online Theater
Lost Password
Free Upgrades
Insider Circle
Student Databases
Change Email
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search Our Site
Waiting List
Production Schedule
Collapse Menus
Live Chat
Customer Support
WalkThru Tutorials
Consulting Services
About Us
Affiliate Program
Richard Rost
Free Lessons
Mailing List
Video Tutorials
MYOLP Memberships
Idiot's Guide to Excel
Volume Discounts
Payment Info
Terms of Sale
Gift CDs
Live Chat
General Info
Support Policy
Contact Form
Email Us
Mailing Address
Phone Number
Fax Number
Course Survey
Facebook    Twitter

Google Plus    LinkedIn

Blog RSS Feed    YouTube Channel
Richard Rost Microsoft MVP