Query to combine records based on info

  • Thread starter Thread starter Caleb
  • Start date Start date
C

Caleb

Hi, okay so I have two tables, one has a phone number field, where the other
has more accurate information but no phone numbers. When I run a duplicates
query based on 'First Name', 'Last Name', 'Address1', 'State' and 'City' I
get about 14,000 results. I need to write a query that will compare the
duplicates, and if table1 (the one with phone numbers) has a phone number in
its field, to copy the number to table2 (the more up-to-date records). Please
if anyone can help, there is no way I can do this manually. Thanks in advance,
Caleb
 
STEP 1: BACKUP your data before attempting the following.
STEP 2: BACKUP your data before attempting the following.

Without a backup you cannot restore the data if this does not work the way you
expect.

Create a new query
Add your two tables to the query
Set up a multi-field join by
== Drag from LastName to Lastname
== Drag from FirstName to FirstName
== repeat drag for Address1, State, and City
== Add Table2 Phone number field to the list of fields
== Select QUery: Update from the menu
== enter the following in the UPDATE TO "Cell" under the Phone number field
using your table and field names.
[Table1]![Phone Number]
== Select Query: Run from the menu


John Spencer
Access MVP 2002-2005, 2007-2009
The Hilltop Institute
University of Maryland Baltimore County
 
Back
Top