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 |
Filtering a query on two date fields?
Dean 

16 years ago
Ok, I have a query which ought to be pretty simple.  Here goes.

I'm a rusty intermediate user of Access who is having to get back in to it in a new job, the question is in reference to Access 2000.

I have two extensive tables I'm trying to filter in a query to show me only those groupings that were:

A: Born after a certain date (using the Parent Date Of Birth field), and;

B: Have a child, born whilst the client was still a teenager. (using child DOB field).

Hence the challenge is to get, based on the two DOB fields, any data where the age between the parent and child is less than 20 years (even if both parties are now well past their teenage years!).  How can I set up criteria to do this?

If I dumped the data into Excel I could probably do it, but that is not a solution in the long term.

Thanks in advance for any wisdom you can offer!

Dean


Answer from Richard Rost:

Assuming both your parent and child are listed in the same RECORD (parentDOB and childDOB) then you could just create a new calculated field in a query to show you the difference between those two dates.

Here's a tutorial that explains how to do that:

http://599cd.com/tips/access/dates-datediff-dateadd/?key=BlFAlEx

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:26 AM. PLT: 1s