Solved

Access 2007 Combine Information in Two Tables

Posted on 2008-10-16
3
1,130 Views
Last Modified: 2012-06-27
I have a linked table that has "Project Number" and "DVD#" as two of the fields and another linked table that has "Project Number" and "Box Number" as two of the fieds.  One database tracks all of the information stored on DVD and the other database tracks all of the archived paper documents.

I am trying to create a query that will combine the two and reflect changes to either table.    I get an error message that "Project Number" could refer to either table.  I need to have one complete list of project numbers combined from both databases.
0
Comment
Question by:new_techie
  • 2
3 Comments
 
LVL 3

Accepted Solution

by:
bandriese earned 500 total points
ID: 22736064
In regards to the error:

Specify the table name allong with Project Number whereever you're using it. For example: [TableA].[Project Number]

In regards to combining the data: It sounds like you need to create a relationship between the two tables. You can drag and drop fields from one table to the other to create the relationship. Your SQL code will look something like this:
SELECT TableA.PrjectNumber, TableA.DVD#, tableb.BobNumber

FROM tableA INNER JOIN tableB ON TableA.ProjectNumber = TableB.ProjectNumber;

Open in new window

0
 
LVL 3

Expert Comment

by:bandriese
ID: 22736079
Another Note to clarify: Creating the relationship will probibly eliminate your error, unless you were using Project Number as a criteria...
0
 

Author Comment

by:new_techie
ID: 22854136
I found that it was even easier to create a union query.  I had to make sure there was an even number of fields and that the field names matched.
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
Describes a method of obtaining an object variable to an already running instance of Microsoft Access so that it can be controlled via automation.
In Microsoft Access, learn the trick to repeating sub-report headings at the top of each page. The problem with sub-reports and headings: Add a dummy group to the sub report using the expression =1: Set the “Repeat Section” property of the dummy…
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

759 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now