Solved

Vlookup in Access

Posted on 2014-03-17
4
252 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 36

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 36

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

NAS Cloud Backup Strategies

This article explains backup scenarios when using network storage. We review the so-called “3-2-1 strategy” and summarize the methods you can use to send NAS data to the cloud

Question has a verified solution.

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

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
For both online and offline retail, the cross-channel business is the most recent pattern in the B2C trade space.
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

829 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