Access VBA

Excel VBA
Excel Formulas
User-defined Functions
Office Links
Access VBA
Access SQL
Alan’s Excel FAQ
Excel Home
Alan’s Home

DLookUp with Two Criteria

I had the idea that you could use more than one criteria in a dLookUp but had a hard time finding an example.
DLookUp("FirstNameMI","[BorrowerInfo]","DVid=" & [ID] & " And BorrowerType='B2'")

Return “First Name” from the “BorrowerInfo” table, where the ID in “DVid” is the same AND the “BorrowerType” is B2


Everything is exactly the same as one criteria except that you add the word “And” to join them together.

© 2009-2010

Updated:  05/27/2010 19:26
This page added:  12 February 2009