The first half of this class is about keeping two
databases synchronized. Perhaps you have an office database and a
copy on your laptop - you want to keep them both in synch. We will begin
by talking about database replicas and why I don't like them. So
we'll write code to handle this ourselves.
We'll make two different customer tables,
and have our VBA code detect any changes between them - either different
or new records.

We'll create a form with two subforms so you can
see changes between the tables. This would happen if, say, you changed
the database on your laptop and someone else changed the office database
at the same time. Now you have a conflict to resolve.

We'll make a button to bring any changes
in customer table 2 into customer table 1. We'll also make a button to
import any NEW records that were added.

Now we'll move ahead to student attendence.
We'll make a simple student table. Then we'll make a form with a
mult-select listbox on it so we can select the students that were
absent, enter the date, and then with one click mark them all absent.

You'll learn how to determine which days are
weekend days. We'll also make a table with allowed school holidays,
so we can exclude those from our date calculations when figuring out how
many days students have missed.

Knowing this, and what the first and last days of
school are, you'll be able to calculate the number of days each
student was in school.

Access 325 - Course Outline
1. Compare Two Tables, Part 1
Synchronizing Two Tables
Discuss Replication
Detecting Changed Records
Exit For
2. Compare Two Tables, Part 2
ListBox to See Different Records
Customer SubForms
Change SubForm Data in VBA
Subform.SourceObject
Subform.Form.RecordSource
3. Compare Two Tables, Part 3
Importing Changes
Detecting New Records
Find Unmatched Query Wizard
What Does Unmatched Wizard Do?
Change RowSource of ListBox
Importing New Records
4. Student Attendence, Part 1
Tables to Track Students & Days Absent
Multi-Select Listbox to Pick Students
Recordset to Add Absent Days
Table to Track Days Off (Holidays, etc.)
Aggregate Query to Count Absent Days
Global Module
Public Function DaysInSchoolYear
5. Student Attendence, Part 2
DLOOKUP Start / End of School Year
Loop Through All Days
Count School Days
Exclude Weekends, Days Off
View > Immediate Window
Checking Variables
Testing Function Return Values
6. Student Attendence, Part 3
Count of Absent Days Query
Show Days In Class (Subtract From Total)
Show Percentage
Placing Start / End School Year in Table
Showing Days Attended up to Any Date
Form Cycle: Current Record Only
Saving Data To Table (Refresh) AfterUpdate
Button to Display Student Query
|