Syntax help needed for DLookup

Posted on 2011-10-26
Last Modified: 2012-05-12
This is so frustrating. I have asked a similar question over the years no less than 10 times. All of the answers are in my knowledge base and I still can't figure it out.

I am getting a #NAME? error for this:

DLookup("UserType", "tblUsers", "Password = " & Chr(34) & Me.Password & Chr(34) & " ")

Me.Password is text.
Question by:dlogan7
    LVL 19

    Expert Comment

    Try this:

    DLookup("UserType", "tblUsers", "Password = '" & Me.Password & "'")

    LVL 19

    Accepted Solution

    If the above is not working:

    Try this one:

    DLookup("UserType", "tblUsers", "[Password] = '" & [Password] & "'")


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Suggested Solutions

    The first two articles in this short series — Using a Criteria Form to Filter Records ( and Building a Custom Filter ( — discuss in some detail how a form can be…
    In the article entitled Working with Objects – Part 1 (, you learned the basics of working with objects, properties, methods, and events. In Work…
    Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
    Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

    779 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

    15 Experts available now in Live!

    Get 1:1 Help Now