Solved

Vlookup in Access

Posted on 2014-03-17
4
244 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
  • 2
4 Comments
 
LVL 34

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 34

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Slowly Changing Dimension Transformation component in data task flow is very useful for us to manage and control how data changes in SSIS.
A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
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…

948 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now