1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Access 2010 Lookup

Discussion in 'Business Applications' started by kcharte, Nov 17, 2011.

Thread Status:
Not open for further replies.
Advertisement
  1. kcharte

    kcharte Thread Starter

    Joined:
    Nov 17, 2011
    Messages:
    2
    Hi Guys,

    Been trying to figure this out for two days. Scoured the net and just cannot figure it out. I want to do somthing similar to excel lookup. I have a table, EmployeeData. It has employee numbers (EmpNo) and last names (LastName) fields. I have a query that returns data only by employee number. I am trying to add a field to this query to lookup the employee number on my EmployeeData table, compare to the employee number column (EmployeeNo) in my query and return the Last name in a new column. I would then hide the EmployeeNo column and display the new column with last name. I have tried the DLookup with no success. I am very new to access. Does anyone have suggestions? Thanks so much!
    Eric
     
  2. OBP

    OBP

    Joined:
    Mar 8, 2005
    Messages:
    19,895
    You just need to add the Lastname to the current query which has the EmployeeNo.
     
  3. kcharte

    kcharte Thread Starter

    Joined:
    Nov 17, 2011
    Messages:
    2
    Thanks OBP. Now how can I link the LastName to the EmployeeNo so I can display the last name and hide the employee number? My original table from which the query pulls from only contains the employee numbers.
     
  4. OBP

    OBP

    Joined:
    Mar 8, 2005
    Messages:
    19,895
    Can I ask why "My original table from which the query pulls from only contains the employee numbers."
    Why not have the other data in that table?
    The tables in the Query should be Linked via the employee number, which should be in both tables.
    If you are using this for a Combo you set the first column (ID field) Width to 0cm.
    If you are just using it in a form then you can set the ID field to "Visible" = No.
     
As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/1027278

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice