A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Database Design
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

merging two .mdb files



 
 
Thread Tools Display Modes
  #1  
Old February 12th, 2005, 01:25 AM
Masoud
external usenet poster
 
Posts: n/a
Default merging two .mdb files

I have two .mdb files with exactly the same structure
(Tables,...) but the second database has a data subset of
the first (base)data.

I need to merge these two DBs into one database. I need
to do it through SQL, ADO via VBA code. My main problem is
writing the SQL statment to do following:

1- chose a record from second database
2- Search the first (Base) database for that record
3- Compare the records
4- If they are different, replace the Base record with the
second DB record

I would appreciate any help.

Regards
Mark Paydar
..


  #2  
Old February 12th, 2005, 05:31 AM
Jack MacDonald
external usenet poster
 
Posts: n/a
Default

I would approach it this way:

create a new MDB file
link the tables from both the existing mdb files
create a query that joins the tables
add criteria that select only "different" records
update the fields as appropriate

If this is an on-going occurrence, save the query and run it
periodically. If there are multiple tables involved, create multiple
queries. No VBA required.



On Fri, 11 Feb 2005 16:25:02 -0800, Masoud
wrote:

I have two .mdb files with exactly the same structure
(Tables,...) but the second database has a data subset of
the first (base)data.

I need to merge these two DBs into one database. I need
to do it through SQL, ADO via VBA code. My main problem is
writing the SQL statment to do following:

1- chose a record from second database
2- Search the first (Base) database for that record
3- Compare the records
4- If they are different, replace the Base record with the
second DB record

I would appreciate any help.

Regards
Mark Paydar
.



**********************

remove uppercase letters for true email
http://www.geocities.com/jacksonmacd/ for info on MS Access security
 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Merging multiple files into one powerpoint file Fox Powerpoint 6 September 13th, 2004 06:21 PM


All times are GMT +1. The time now is 07:06 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.