Free Lessons
Courses
Seminars
TechHelp
Fast Tips
Templates
Topic Index
Forum
ABCD
 
Home   Courses   TechHelp   Forums   Help   Contact   Merch   Join   Order   Logon  
 
Back to Access Forum    Comments List
Upload Images   @Reply   Bookmark    Link   Email   Next Unseen 
DLOOKUP Help
Richard O 
    
13 years ago
Good Day Richard
Problem: Not able to filter a field in a query resulting from a DLOOKUP expression.
Just as you predicted, I m having trouble getting DLOOKUP to work satisfactorily.  A Payments table records member payment including those for subscriptions to a magazine (Wings); fields in this table relevant to the problem are; [ReceiptDate] (a date field) which records payment date, and [WingsComplementary?] which is true for members who receive the magazine without charge.  Another table named WingsEditionLookup provides an array with [ClosingDate] related to the publication date [EditionDate].  Again these fields are in date format.  They have been sorted Oldest to Newest.
The expression in the query is: FirstDelivery: IIf([WingsComplimentary?]=True,Null,DLookUp("[EditionDate]","WingsEditionLookup","[ClosingDate]>#" & [ReceiptDate] & "#"))
The IF function overcomes the error produced in the record for those members who qualify for complimentary copies of the magazine (because the [ReceiptDate] field is blank).
The query runs with this expression.  But there are two problems.  The [EditionDate] field returned by DLOOKUP is not always correct.  The other problem is that I m unable to filter the field [FirstDelivery].  Access generates the following error message: Syntax error in date in query expression  [ClosingDate]>#
In an attempt to trouble shoot the problem, I changed the date format in the relevant tables to Number and modified the DLOOKUP criteria to  [ClosingDate]>  & [ReceiptDate].  This overcame the problem of incorrect look up of [EditionDate].  But, the filtering problem remained.
This time the error message was: Syntax error (missing operator) in query expression  [ClosingDate]>
Sorry for being so verbose, but it is the only way I can describe the problem.
Best Regards Richard.

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

Next Unseen

 
New Feature: Comment Live View
 
 

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: 5/17/2026 7:31:50 PM. PLT: 0s