Matching Records

  • Thread starter Thread starter Always Learning
  • Start date Start date
A

Always Learning

Hi There,

I'm in need of your help again.

I have 2 files.
I want to run through file 1 and if a match is found in file 2 I want to
take the record out of file 1 and add it to a new file and put a value in
the record in the new file from file 2.

So for Example
File 1 Contains
Steve, Wilson, Cricket, 0442, UK
David, Wilkes, Football, 2987, UK
Amanda, Burton, Swimming, 1225, UK

File 2 Contains
0442, Cricket, Active
2987, Football, InActive
1225,Swimming, InActive

File 3 (New File) Will Contain
Steve, Wilson, Cricket, 0442, UK, Active
David, Wilkes, Football, 2987, UK, InActive
Amanda, Burton, Swimming, 1225, UK, InActive

Match is made by Code and Sport. I.E. 0442 & Cricket

Hope this makes sense.

Your help is appreciated.

All the best,

Steve Wilson.
 
In the new file, link to the two tables you want to pull data from. Create a
query that has these two tables and link them on the field that you want to
be the same in both. This will limit the query to returning only those
records where the associated field from the two tables match. Add the field
from table 2 that you also want to write to the new file. Open the query to
see if it looks correct, if so, change back to design view and on the Query
menu, choose Append Query to change the query to an Append Query. When
prompted, select the table that you want to add the records to and execute
the query.
 
There's nothing about MS Access in your post. If you are seeking help
with an ACCESS problem, please post again using identifiable
terminology.

While it's possible to achieve the results you seek using Access, you
could also achieve them using VB, Excel, Word and various editors.
All of the MS Office applications have their various object models
hung on BASIC (Beginner's All purpose Symbolic Interchange Code) on
steroids.

HTH
 
Back
Top