+ Reply to Thread
Results 1 to 3 of 3

Query problem in access to link two tables

  1. #1
    Registered User
    Join Date
    08-08-2015
    Location
    brisbane
    MS-Off Ver
    2007
    Posts
    17

    Query problem in access to link two tables

    Dear All,
    Good day. I am very new in access database. I really need your help in linking two table and extracting data. I have two table, one table contain (named as "before retag") tree diameter measurement from 1952-1979 and another table (named as "after retag") has the same tree diameter measurement from 1979-1997. I want to match the "old no" column from both table. To do this I made a relationship in the database by selecting "old no" in both files. When I use the simple query wizard to match "old no" in both table to extract information for all the variables, they appear differently. They create same heading two times, one for before retag table and another for after retag table. In reality they should lined up under one heading. You can see this in may shared database"

    https://www.dropbox.com/s/1eoff4qlcp...ase.accdb?dl=0


    However the correct format will be:

    Tree&measure ID/Short tree and measired ID/short tree ID/Exp/plot/old no/new no/year/species..............

    and the data need to arrange from 1952-1997 under each heading, not separate for each table. Trees that have similar "old no" in before and after retag table need to be arrange under each heading.

    I have 2 separate tables because all the trees that were measure in before re-tag during 1952-1979, after re-tag table all those trees were not measure. Some of the trees were measured from that period in after re-tag period. Thats why I want to pull out the trees that have continuous measurement before and after retag table. here "old no" is an indication that this trees were measure both before and after. With the union query it structured them under one heading. However, it doesn't pull out only those trees were measure before and after retag using the "old no" column in both table. UNION QUERY helps me to structure them under one headings. However, I want only those trees were measure before and after reatg.

    How do I solve this. It would be really a great help.

    Thanks

    Kind Regards
    Sohel
    Last edited by sohel_for; 12-12-2015 at 09:58 AM.

  2. #2
    Valued Forum Contributor tony h's Avatar
    Join Date
    03-14-2005
    Location
    England: London and Lincolnshire
    Posts
    1,187

    Re: Query problem in access to link two tables

    This might help you.
    You will need to create a new query ... go to view-SQL and paste this in

    Please Login or Register  to view this content.
    If you need to reorder columns (or add/delete columns) make sure you keep the same changes in both parts of the union.


    click on the * Add Reputation if this was useful or entertaining.

  3. #3
    Registered User
    Join Date
    08-08-2015
    Location
    brisbane
    MS-Off Ver
    2007
    Posts
    17

    Re: Query problem in access to link two tables

    Thanks a lot for your excellent help.

    Stay fine.

    Kind regards
    Sohel

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Problems with Excel link to Access query not updating
    By JayhawkPammy in forum Excel General
    Replies: 3
    Last Post: 12-06-2013, 10:05 AM
  2. Access VBA or SQL to create a query that has matching data from 2 tables
    By ewong in forum Access Programming / VBA / Macros
    Replies: 15
    Last Post: 09-13-2012, 04:42 PM
  3. Link Excel Spreadsheets to Access Form/Tables
    By _Ryan_ in forum Access Tables & Databases
    Replies: 0
    Last Post: 07-06-2010, 11:52 AM
  4. Linked tables in Access won't query with macro
    By Golden Maple in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-22-2010, 01:42 PM
  5. [SOLVED] MS Query cannot find tables in Access database
    By Dennis Cheung in forum Excel General
    Replies: 0
    Last Post: 07-07-2005, 12:05 PM
  6. Removing Link to Access Query
    By a_ryan1972 in forum Excel General
    Replies: 0
    Last Post: 04-11-2005, 01:06 PM
  7. [SOLVED] Link Access query to refresh an EXCEL file
    By Dancer4u in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 01-13-2005, 02:06 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1