Results 1 to 5 of 5
  1. #1
    KIDRoach is offline Novice
    Windows Vista Access 2007
    Join Date
    Jun 2009
    Posts
    4

    Simple Question about Referring to tables

    I have just started using access yesterday and it seems like this would be pretty simple to do. But... I don't know how to do it.


    I have two tables.

    First table has two columns: County Number and County Road Mileage (80 rows)

    Second table, the index, has two columns: County Names and County Number (92 rows)


    Is there a way in Access for me to create another table that has:

    County Number, County Name, and Road Mileage as three separate columns?


    I would like the first table to be the base of the new table. Then, I'd like Access to look up the county number that's in the first table, and produce the county name and write it beside the county number...



    How do I do this?

    Thanks!

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    If the County Number in the first table is the same number as the County Number in the second table then you can use the Relationship Menu to Join the two tables on that field. Then a query will display any of the fields in either table as if they were in the same table.

  3. #3
    KIDRoach is offline Novice
    Windows Vista Access 2007
    Join Date
    Jun 2009
    Posts
    4
    Thanks!

    I really appreciate the answer. But like I said, I'm a total beginner in access. The only thing I have right now (Pretty much the only thing I know how to do) is I have two tables.

    One is with County Number and Total Mileage for that County


    The other one is an index table in which I have the County Number, and the Name of the County.



    How do I get from this to a report/form/query showing the County Name and County Mileage?


    Also, the column County Number in the first table is titled "County Code" in the second table. Does the title has to be the same?


    Thanks again!

    Edit: just to clarify, how do I define a relationship between tables? So far, I only know how to define relationship between columns.

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Quote Originally Posted by KIDRoach View Post
    ...the column County Number in the first table is titled "County Code" in the second table. Does the title has to be the same?
    If the data are the same in each table then it is easier to understand and maintain if the names of the fields are the same in both tables but it is not manditory.

  5. #5
    KIDRoach is offline Novice
    Windows Vista Access 2007
    Join Date
    Jun 2009
    Posts
    4
    Finally~! I got it to work!

    I have another related question, however, now that I know how to do that.


    So I have 3 tables now.

    First table has 3 columns: County No., City No. and Total Length

    Second Table has 2 columns: County No. and County Names

    Third Table has 2 columns: City No. and City Names


    I want to add two columns on the first table. County Names and City Names.

    I tried using the method that you had. It didn't work. For some reason, when I put the county names in, it showed up okay.

    But, when I tried putting the city names in the query, it doesn't show up. Is there another method?


    Thanks!

    Edit: Here's a screenshot of what I did.



    Am I doing it right?

    INC_Number = City No. = City Code
    COUNTY_COD = County No.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Very simple question!
    By fiddley in forum Programming
    Replies: 2
    Last Post: 04-28-2009, 02:16 AM
  2. Simple but hard question
    By andymok in forum Reports
    Replies: 1
    Last Post: 09-20-2007, 09:19 AM
  3. Referring to fields in tab controls
    By AndrewAfresh in forum Forms
    Replies: 1
    Last Post: 06-03-2006, 05:10 PM
  4. Should be simple Query Question
    By brj1 in forum Queries
    Replies: 2
    Last Post: 03-04-2006, 01:11 PM
  5. Probably a simple report question
    By gmurrie in forum Reports
    Replies: 1
    Last Post: 12-28-2005, 09:19 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums