?
Solved

Comparing 2 tables in Access 2000

Posted on 2003-03-18
4
Medium Priority
?
132 Views
Last Modified: 2010-05-01
I hope this is an easy one:

I have 2 tables.  The first table is my master database consisting of approx 20,000 records in 25 fields.  The second table is a database containing only approx 1000 records in only 3 fields.

What I want to do is to compare the 2 tables (in the form of a re-usable query)and flag those records (in this caee approx 1000 records) where the data IN ALL THREE FIELDS matches.

So in English (as opposed to SQL) the task is roughly:  Compare mastertable [Field1] with subtable [field1] AND mastertable [field2] with subtable [field2] AND mastertable [field3] with subtable [field3].  Where all 3 fields match add "ABC123" to [Comments] field and "ZYX987" to [Another] field.

Thanks.





  (This comes about because I send out the name, zipcode & fax fields from my whole database to a third party who checks every fax # and then returns
0
Comment
Question by:brianthorpe1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 

Author Comment

by:brianthorpe1
ID: 8158797
Ooops.  Pls ignore the line at the bottom of my quetion.  This should have been deleted before I hit Submit !!
0
 
LVL 6

Accepted Solution

by:
DrTech earned 160 total points
ID: 8158952
UPDATE T1 INNER JOIN T2 ON (T1.F3 = T2.F3) AND (T1.F2 = T2.F2) AND (T1.F1 = T2.F1) SET T1.Flag = "ABC123", T1.[Value] = ZYX987";

T1 and T2 are the tables
F1 F2 and F3 are the fields to compare
Flag and value are the fields to update
0
 

Expert Comment

by:CleanupPing
ID: 8899983
brianthorpe1:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1 
Experts: Post your closing recommendations!  Who deserves points here?
0
 
LVL 6

Expert Comment

by:GPrentice00
ID: 8957204
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:

-->Accept DrTech's comments as answer

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

GPrentice00
EE Cleanup Volunteer
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question