473,473 Members | 1,510 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Merge similar records in Access 2007

2 New Member
Hi,

I have an Access 2007 database that contains customer contact information. There are over 8,000 that include name, organization (as a look-up column), email, phone, address, and events that each person should be invited to (also a look-up column).

Separate from this is an Excel spreadsheet that contains the some of the same information, with about 10,000 records. The overlap with duplicate names/records is probably about 50%, but of these, the Excel would have more information than the Access file, though Access does have a field that we don’t want to overwrite.

I know that can import the Excel spreadsheet into Access, but at that point is there a relatively easy way to find similar items (based on first name, last name, organization) and then merge those records - not just delete one of them? The Access record might have the name, organization and email address; while the Excel file might have the name, organization, phone number and mailing address - so I'd want to have 1 record for that contact which included all fields. Any help with this would be greatly appreciated!
Jun 19 '09 #1
3 8807
patjones
931 Recognized Expert Contributor
Hi -

This process is much easier if there is something in each record that is unique to that particular person. Usually that would be something like an SSN or employee ID or customer ID, etc.

Since I'm assuming you don't have a field like that in your data, I would ask whether or not there is an email or phone number for each record in both sets of data (the one in Access and the one in Excel). If so perhaps you can find matches on that basis - provided that each phone number or email belongs to only one person in the database.

Barring the possibility of doing this merge on the basis of email or phone number, you would need to create a query that looks for records that have the same first and last name - and when such a match is found, form the new record by putting in whatever fields you want from the two old records.
Jun 22 '09 #2
khoward
2 New Member
Unfortunately I don't have any unique identifiers. Phone numbers are frequently the organization's main number, so mulitple people could have the same. Similarly, we'll sometimes have 1 person, usually an admin assistant, who has their email address listed for multiple people.

Going with your suggestion below, can you tell me how I would set up the query the way you describe?

Barring the possibility of doing this merge on the basis of email or phone number, you would need to create a query that looks for records that have the same first and last name - and when such a match is found, form the new record by putting in whatever fields you want from the two old records.

Thank you for your help!
Jun 22 '09 #3
patjones
931 Recognized Expert Contributor
One way to do this might be to create a composite key that consists of both fields, first and last names. Before that however, try the procedure below, which uses the Query Design view in Access.

What you would do is import the Excel data into Access. If you're using Access 2007, go to the ribbon up top and see External Data > Import Data > Excel and then follow the prompts to import the data into a new table in the database.

Once you have the Excel data in a new table, and have all the columns formatted in the same manner as the columns in the comparison table, go to Create > Query Design, and add the two tables to the query. Select Make Table up in the ribbon and type in the name of the table that will result from this query.

Notice that when you double click a field name in one of the tables, it inserts it in the grid below. Do this for both the first and last name fields in one of the tables. In the criteria box for each field, type in the corresponding field name in the other table, in the form [table name]![field name]. This will ensure that the query picks out records that have the same first and last name in both tables.

To add in other fields to display in the results, just double click them and they will be added to the grid. Up in the ribbon, click Run and the query should run. Note that sometimes you might need to click Query Tools in order to display the query options in the ribbon.

This process will find all records that match up. There will also be records in the Excel table which don't match up (i.e. aren't in the Access database already), which you could find easily with the Unmatched Query Wizard under Query Wizard in the ribbon.
Jun 22 '09 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Andy Davis | last post by:
I have set up a mail merge document in Word 2003 which gets its data from my Access 2000 database. I want to set up a button on a form that: 1. runs the query to provide the dat for the merge...
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...
2
by: JK | last post by:
I saw Danny Lesandrini's article on Database Journal (http://www.databasejournal.com/features/msaccess/article.php/2236471) on how to merge tables from identical databases. This is exactly what...
16
by: Sam Durai | last post by:
Hello, I need to merge a small table (of rows less than 100,sometimes even 0 rows) to a big table (of rows around 4 billion). I used the PK of the big table as merge key but merge does a table scan...
2
by: Matt | last post by:
Hi All, I want to do the following: 1). Create a Word Document that has set text and placeholders for information in my database. 2.) Write a query that returns some records. 3.) Fill the...
1
by: Esther Lane | last post by:
Hello! First off, many many thanks to Albert who wrote the Mail Merge code for MS Access I am using. It has been working beautifully for a few years. However, my client just (without notice!)...
1
by: dvora123 | last post by:
I have 2 questions regarding my Access db: 1. I have records which will need followup in approx 6 months. Rather than looking up 6 months, what would be good code to calculate 6 months ahead?...
1
by: cjdewitt | last post by:
First I would like to thank Albert Kallal for the Super Easy Word Merge. I have been using this in an Access 2003 database for a while, then upgraded to Access 2007 - worked until I split the...
1
by: kayberrie | last post by:
I want to write a VBA mail merge code. I want to link the code/macro/dohicky to a nifty little button so it makes life easy. I think I can handle the button part, the code part - not so much. I know...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

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.