Solved

Vlookup in Access

Posted on 2014-03-17
4
254 Views
Last Modified: 2014-03-21
Good Day Experts,
I have never executed a Vlookup in Access and was wondering if I could get some assistance.
I have two tables FACMatch and CSWMatch, I would like to compare or match any cert num in FACMatch with cardholderid in CSWMatch.  I also need to remove the last two digits of the cardholderid before performing the Vlookup.  For your review I have attached the accdb. Thank you for any assistance you can provide.
CSWMatch.accdb
0
Comment
Question by:Beeyen
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 37

Expert Comment

by:PatHartman
ID: 39934987
The equivalent function in Access is named DLookup().  However, in most cases a join is more efficient.
0
 

Author Comment

by:Beeyen
ID: 39935918
Could you be more specific please? Thanks
0
 
LVL 37

Accepted Solution

by:
PatHartman earned 500 total points
ID: 39935945
select tbl1.fldA, tbl2.fldb
From tbl1 Inner Join tbl2 ON tbl1.fldA = tbl2.fldA;


select tbl1.fldA, DLookup("fldb", "tbl2", "fldA = " & tbl1.fldA)
From tbl1;

The first option is much more efficient than the second.
0
 
LVL 75

Expert Comment

by:Anthony Perkins
ID: 39938580
However, in most cases a join is more efficient.
Not to mention that it would also be more portable (considering that the MS SQL Server topic was included in this thread).
0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

AutoNumbers should increment automatically, without duplicates.  But sometimes something goes wrong, and the next AutoNumber value is a duplicate.  This article shows how to recover from this problem.
A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.
With Microsoft Access, learn how to start a database in different ways and produce different start-up actions allowing you to use a single database to perform multiple tasks. Specify a start-up form through options: Specify an Autoexec macro: Us…

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question