Roger's Access Library Homepage
Forum Home Forum Home > Roger's Access Library > Roger's Download Samples
  New Posts New Posts RSS Feed - CompareTwoTables.mdb (intermediate)
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Please consider donating $1 per sample downloaded, (find out why here)

CompareTwoTables.mdb (intermediate)

 Post Reply Post Reply
Roger Carlson View Drop Down
Microsoft MVP
Microsoft MVP

Joined: 20 Feb 2008
Status: Offline
Points: 261
Post Options Post Options   Thanks (0) Thanks(0)   Quote Roger Carlson Quote  Post ReplyReply Direct Link To This Post Topic: CompareTwoTables.mdb (intermediate)
    Posted: 01 Aug 2008 at 7:11am

Please consider donating $1 per sample downloaded, find out why here.


This sample shows how you can programmatically compare two tables and write out the differences to a third table.

It assumes that one table (the Base) is considered to be the accurate table. The table that is being compared to the base table is called the Varying table. The results, listed in the TableDiscrepancies table are alway listed in terms of the base table.

There are two different versions, CompareTables in Module1 and CompareTables2 in Module2. The main difference is that CompareTables2 is more robust, giving you more information about what was changed and putting the information into separate fields rather than just a string.

To run this application, go to the appropriate Module, place the cursor in the "testCompare" sub routine and put the Run button.
Access 97 (36 KB):
Access 2000 - 2002010 (mdb):

Consider donating $1 per sample downloaded, find out why here.<
Back to Top
Sponsored Links

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.03
Copyright ©2001-2019 Web Wiz Ltd.