Access 2010 Lookup

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

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
 

OBP

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

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.
 

OBP

Joined
Mar 8, 2005
Messages
19,896
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.
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

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 807,865 other people just like you!

Latest posts

Members online

Top