473,396 Members | 1,907 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

How to Merge Records from Two Identical Access Databases

JK
I saw Danny Lesandrini's article on Database Journal
(http://www.databasejournal.com/featu...le.php/2236471)
on how to merge tables from identical databases. This is exactly what
I'm trying to do (we have 3 field offices and want to merge all of
their data into one database so we can report out on all three), but
instead of doing it by hand, I want to write code so a user can just
click a button and it will merge the three databases together. The
problem I'm running into in doing this is that I can't seem to do
Danny's step 1 (Remove the autonumber from EmployeeID field in
tblEmployee for Site B) using VBA.

In all the forum posts I've read, it says that it is not possible to
do this in VBA. I tried doing this with a line of code similar to:

tbl.Columns.Item("AutoNumberFieldName").Properties ("AutoIncrement").Value
= No

But according to what people post online, it is not possible to change
this value in an existing table. I'm using Access 2003. Is this
still true with v2003? Any advice from Danny or anyone else out there
on how I might accomplish this?

Thanks,
JK

Jan 22 '07 #1
2 4146
JK wrote:
tbl.Columns.Item("AutoNumberFieldName").Properties ("AutoIncrement").Value
= No

But according to what people post online, it is not possible to change
this value in an existing table. I'm using Access 2003. Is this
still true with v2003? Any advice from Danny or anyone else out there
on how I might accomplish this?
CurrentProject.Connection.Execute "ALTER TABLE Table1 ALTER COLUMN ID
Integer"

Jan 22 '07 #2
JK
Wonderful.
Fabulous.
Perfect.

In other words - that worked!

Muchos gracias,
JK
Lyle Fairfield wrote:
JK wrote:
tbl.Columns.Item("AutoNumberFieldName").Properties ("AutoIncrement").Value
= No

But according to what people post online, it is not possible to change
this value in an existing table. I'm using Access 2003. Is this
still true with v2003? Any advice from Danny or anyone else out there
on how I might accomplish this?

CurrentProject.Connection.Execute "ALTER TABLE Table1 ALTER COLUMN ID
Integer"
Jan 22 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Damon Grieves | last post by:
Hi I just want to be sure I understand how the Access client works. If I have an Access back end with a million records on a server and an Access client. If the client is installed on the users pc...
4
by: Drum2001 | last post by:
My question is in reference to the following closed thread. ...
3
by: John Cosmas | last post by:
I have a DATATABLE which I have populated in my application, and I need it written out to a particular table I specify in my ACCESS database. My code works to the point of the MERGE and UPDATE,...
6
by: crealesmith | last post by:
Firstly, I have no problem with mail merging to Word, VB code for that works perfectly. On one mail merge I need to merge 15 fields of data that are from 3 seperate records. The 3 records are all...
1
by: ammie | last post by:
I have two databases with identical tables structures. I need to merge the data in both databases without implementing merge replication. Can someone tell me what script to run that will compare...
1
by: Bmack500 | last post by:
I'm using the following subroutine. The two different XML files are identical with the exception of three additional records in the second one. One has 450 records, and the other has 453. After...
2
by: rfranzl | last post by:
Hello, I need some help, I have about 200 databases that are copies of an original database that has a similiar table in all of the databases, called "tblCodebook". What I am trying to do is to...
3
by: HarryTheB | last post by:
Hi, I am using the following code in Access 2003 to merge data from a query to a table in a Word document: Private Sub BtnMerge_Click() Dim db As DAO.Database Dim objWord As...
2
by: jjwiet | last post by:
Hello, I use access 2003 and attempting to export/copy records between two access databases (almost identical) with multiple tables (both databases having the same relations between the tables)....
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.