Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Help   Contact   Merch   Join   Order   Logon   Forums   
 
Back to Access Forum    Comments List
Upload Images | @Reply | Bookmark | Link | Email | Next Unseen |
DLookup With 2 Criteria
Jerry Fowler 
       
4 years ago
I have been trying to get a Dlookup to work with 2 pieces of criteria.  The table is named PhoneT and has four fields

PhoneID AutoNumber ( not needed in this example)
MemID ShortText '8 characters mix of AlphaNumeric data
PhoneNo ShortText '10 Numeric characters
PhoneType ShortText 'contains "Work", "Cell" or "Home"

here is what I have tried and keep getting #Error

DLookUp("PhoneNo","PhoneT","MemID =""" & [MemID] & """ AND PhoneType= Home")

DLookUp("PhoneNo","PhoneT","MemID =""" & [MemID] & """ AND PhoneType= Home"""")

and a few more I don't remember at this time.  I have rewatched the Concatnation with Double Double quote and the Dlookup TechHelp videos.  I'm fine (to a point) before I added the PhoneType but its hit and miss on getting the right phone number.
Adam Schwanz  @Reply  
           
4 years ago
Your second attempt has the right idea, 1 too many though at the end, also missing some before Home

""Home"" Two Double Quotes or
'Home' Single quotes because it's short text

PhoneType=""Home"""
Jerry Fowler OP  @Reply  
       
4 years ago
Thanks I had quotes at one point but I'm sure it was just one double quote on each side of Home ("Home")  I get confused as I keep thinking that the AND PhoneType=Home would be between their own quotes as its all text. I'll get it at some point lol.  Sure appreiceiate the help

This thread is now CLOSED. If you wish to comment, start a NEW discussion in Access Forum.
 

Next Unseen

 
 
What's This?

 

The following is a paid advertisement
Computer Learning Zone is not responsible for any content shown or offers made by these ads.
 

Learn
 
Access - index
Excel - index
Word - index
Windows - index
PowerPoint - index
Photoshop - index
Visual Basic - index
ASP - index
Seminars
More...
Customers
 
Login
My Account
My Courses
Lost Password
Memberships
Student Databases
Change Email
Info
 
Latest News
New Releases
User Forums
Topic Glossary
Tips & Tricks
Search The Site
Code Vault
Collapse Menus
Help
 
Customer Support
Web Site Tour
FAQs
TechHelp
Consulting Services
About
 
Background
Testimonials
Jobs
Affiliate Program
Richard Rost
Free Lessons
Mailing List
PCResale.NET
Order
 
Video Tutorials
Handbooks
Memberships
Learning Connection
Idiot's Guide to Excel
Volume Discounts
Payment Info
Shipping
Terms of Sale
Contact
 
Contact Info
Support Policy
Mailing Address
Phone Number
Fax Number
Course Survey
Email Richard
[email protected]
Blog RSS Feed    YouTube Channel

LinkedIn
Copyright 2026 by Computer Learning Zone, Amicron, and Richard Rost. All Rights Reserved. Current Time: 11/15/2026 9:06:05 AM. PLT: 1s