Compare Data

Jimee

Registered User.
Local time
Today, 18:05
Joined
May 4, 2001
Messages
21
I have a database that gathers and coalates data from hundreds of individual databases. What I need to do is find a way to compare the data from one point in time to another. What I am going to do is initially run the coaliting database and name it Rev_A. Then at some point in the future we will run it again and Call it Rev_B. At that point I will have yet another database that will take the table from Rev_A and Rev_B and I need to compare all fields from each table and show the differences in some way.
 
Will all the table names and all the fields be the same in each database each time?
 
Yes,
 
OK, the issue you have is probably one of how much VBA code can you tolerate?

In general, you have to somehow either import tables from the two databases and run a comparison query, or you have to open recordsets from each database, one table at a time for each, and compare records if there is a way to correlate them.

In order to identify the tables, you need to write code to step through the {database}.TableDefs collection on one database. For each .TableDefs(n) (where n = 1 to .TableDefs.Count) you have to get the name (with .TableDef(n).Name) to open the other table in the other database (with .TableDef(strName) ) and then run whatever comparison you need to run.

Since you don't mention how you would handle comparisons where the tables aren't of the same length, and you don't mention details of what you intend to compare, I can't go much beyond this point.
 
Here is a copy of the database w/ the two tables. I need a report that identifies the different qty
 

Attachments

Users who are viewing this thread

Back
Top Bottom