Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

Comparing 2 tables in Access 2000

Posted on 2003-03-18
4
Medium Priority
?
137 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
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

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

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…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month15 days, 23 hours left to enroll

581 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