Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Help   Contact   Merch   Join   Order   Logon   Forums   
 
Home > Forums > Access Forum > Dlookup Date Criteria by Thomas Corbett
Back to Access Forum    Comments List
Upload Images | @Reply | Bookmark | Link | Email | Next Unseen |
Dlookup Date Criteria
Thomas Corbett 
    
5 years ago
I have a query "Samples Taken x Month Query x 4470 Mod Bit" that separates the data into months and years of the data. I am trying to take the field with the count of samples taken using DLookup to populate the control source on a form. I have the following to do so looking for the criteria for Date Samples Taken month of January with the year 2020.

=DLookUp("[CountOfSample Date]","[Samples Taken x Month Query x 4470 Mod Bit]","[Date Samples Taken]=01,2020")

My problem is this is generating an #error. Any help would be appriciated!

Thanks in advance

Richard Rost  @Reply  
          
5 years ago
Thomas, that's not a valid date format for your criteria.

DLOOKUP("FieldName","TableName","SomeDate=#" & DateField & "#")
Thomas Corbett OP  @Reply  
    
5 years ago
Thank you Professor, I am using a query in Access 2016 with "mm,\,yyyy"
Richard Rost  @Reply  
          
5 years ago
In that case, you have to treat it like a text string:

=DLookUp("[CountOfSample Date]","[Samples Taken x Month Query x 4470 Mod Bit]","[Date Samples Taken]=""01,2020""")
Thomas Corbett OP  @Reply  
    
5 years ago
Thank you Professor, that is exactly what I needed!!!!!
Richard Rost  @Reply  
          
5 years ago
You're very welcome.

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: 10/12/2026 5:07:04 AM. PLT: 1s