• June 12, 2021

PHSARIT

Bring Technology Ideas with you

 What is A DLookup Function?

In Microsoft Access desktop databases, we can use the DLookup function to get the value of a particular field from a specified set of records (a domain).


DLookup( expr, domain [, criteria] )
    Three Arguments

    As example:

    Me.txtname.Value = DLookup("Username", "Tbl_User", "Username='" & Me.txtname.Value & "'")

    The example the above, we make an assumption that we want to find the value from Tbl_User by look up the value through the field “Username” by allow users to enter the value with the textbox control name txtname.

    Username is working as expr while Tbl_User is domain include the criteria to look for txtname becomes a criteria

    Related post