Results 1 to 2 of 2
  1. #1
    Join Date
    Nov 2005
    Posts
    79

    Unanswered: Dlookup muliple values

    Ted was most gracious in helping with a problem on Dlookup. I forgot that in addition to username and password match, I also need the field AccessLevel to equal Admin. Can someone help me?



    If Me.txtPassword.Value = DLookup("Password", "tblUserLogin", _
    "[Username]=""" & Me.cboUsername.Value & """" AND "[AccessLevel]=""Admin""") Then

    Thanking you in advance.

  2. #2
    Join Date
    May 2010
    Posts
    601
    Quote Originally Posted by miracleblake View Post
    Ted was most gracious in helping with a problem on Dlookup. I forgot that in addition to username and password match, I also need the field AccessLevel to equal Admin. Can someone help me?



    If Me.txtPassword.Value = DLookup("Password", "tblUserLogin", _
    "[Username]=""" & Me.cboUsername.Value & """" AND "[AccessLevel]=""Admin""") Then

    Thanking you in advance.
    Try:

    Code:
    
    If Me.txtPassword.Value = DLookup("Password", "tblUserLogin", _
    "[Username]=""" & Me.cboUsername.Value & """ AND [AccessLevel]=""Admin""") Then
    Boyd Trimmell aka HiTechCoach HiTechCoach.com (free access stuff)
    Microsoft MVP - Access Expert
    BPM/Accounting Systems/Inventory Control/CRM
    Programming: Nine different ways to do it right, a thousand ways to do it wrong.
    Binary--it's as easy as 1-10-11

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •