• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 266
  • Last Modified:

Vlookup in Access

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
Beeyen
Asked:
Beeyen
  • 2
1 Solution
 
PatHartmanCommented:
The equivalent function in Access is named DLookup().  However, in most cases a join is more efficient.
0
 
BeeyenAuthor Commented:
Could you be more specific please? Thanks
0
 
PatHartmanCommented:
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
 
Anthony PerkinsCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now