Results 1 to 7 of 7
  1. #1
    agure is offline Advanced Beginner
    Windows 8 Access 2007
    Join Date
    Feb 2014
    Posts
    30

    Lookup Column Question


    So I have two seperate tables i'll give an example this is not my database just showing an example to simplify:

    Table 1:

    Owner Number Address Age
    Adam 1781871781 117 example st 50


    Table 2:

    Owner Age
    Adam


    So What I want in table 2 is to create a lookup for OWNER and then Age automatically fills in according to the value that I already looked up from OWNER.

    In short when I select Adam I want it to show his age being 50 in table 2.

    I know this is probably a simple thing in access i just cant seem to find the way to do this. Thanks guys.

  2. #2
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870
    Select Table2.Owner, Table1.Age
    From Table2 Inner Join Table1 ON
    Table2.Owner = Table1.Owner
    where Table2.Owner = "Adam"

    What exactly is the purpose of Table2?

  3. #3
    agure is offline Advanced Beginner
    Windows 8 Access 2007
    Join Date
    Feb 2014
    Posts
    30
    Quote Originally Posted by orange View Post
    Select Table2.Owner, Table1.Age
    From Table2 Inner Join Table1 ON
    Table2.Owner = Table1.Owner
    where Table2.Owner = "Adam"

    What exactly is the purpose of Table2?
    I have a pretty large database and all I would like to do is everytime I lookup a value in table 2 for the Owner I automatically get the age for each owner.

    My database I just provided and example but same idea.

    Everytime I lookup Owner and get the value from Owner the corresponding Age shows up. The example you gave is specific to one value.

  4. #4
    agure is offline Advanced Beginner
    Windows 8 Access 2007
    Join Date
    Feb 2014
    Posts
    30
    Table 1

    Owner Number Adress Age
    Adam 1818181717 xxyyxxyyy 50
    Pete 1231231891 yxyxyxyxy 44
    Osama 2131312411 xyxyxyxyxyx 22


    Table 2

    Owner Age
    Adam
    Osama

    Here is a better example...

    I'm in table 2... I look up Owner and once I look it up I would like the age to show up automatically in the age column for that owner. I hope that clarifies.

  5. #5
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870
    Remove the constraint ( the Where clause restricts it to Adam)
    Remove the WHERE line

  6. #6
    agure is offline Advanced Beginner
    Windows 8 Access 2007
    Join Date
    Feb 2014
    Posts
    30
    Quote Originally Posted by orange View Post
    Select Table2.Owner, Table1.Age
    From Table2 Inner Join Table1 ON
    Table2.Owner = Table1.Owner

    Where would i write this expression exactly??

  7. #7
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,870
    It is SQL for a query.
    Open your query wizard
    Go to Sql view
    and paste in the SQL I provided

    Then run the query.

    If you have any trouble try this:
    http://bit.ly/1gn3djK

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

Similar Threads

  1. Replies: 5
    Last Post: 09-21-2012, 11:23 AM
  2. Lookup Column Display
    By DDEB in forum Access
    Replies: 1
    Last Post: 05-11-2012, 04:46 PM
  3. Need help with Lookup Column
    By Buakaw in forum Access
    Replies: 5
    Last Post: 02-26-2012, 03:04 PM
  4. Lookup column
    By drvo in forum Access
    Replies: 9
    Last Post: 12-07-2011, 08:29 AM
  5. Getting display value of lookup column?
    By kman42 in forum Access
    Replies: 2
    Last Post: 04-05-2011, 08:23 AM

Tags for this Thread

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