Print Page | Close Window

DaysBetweenQuery.mdb (beginner)(2000-2007)

Printed From: Roger's Access Library
Category: Roger's Access Library
Forum Name: Roger's Download Samples
Forum Description: A compendium of Microsoft Access 97 and 2000+ routines, each separated into its own sample database.
URL: www.rogersaccesslibrary.com/forum/forum_posts.asp?TID=445
Printed Date: 22 Oct 2017 at 11:15am


Topic: DaysBetweenQuery.mdb (beginner)(2000-2007)
Posted By: Roger Carlson
Subject: DaysBetweenQuery.mdb (beginner)(2000-2007)
Date Posted: 29 Jan 2009 at 5:33am
Please consider donating $1 per sample downloaded, http://www.rogersaccesslibrary.com/whydonations.htm - find out why here .
 
DaysBetweenQuery.mdb
 
This sample illustrates how to create a "Days Between" query.  It shows how to:
1) Display the difference between dates in subsquent records of a table
or
2) Display the difference between dates in subsquent records of a table  over a group.  In this case, the group is the OrderID field.

There are two methods shown here: Using a 1) correlated subquery and 2) DMax domain aggregate function.  The correlated subquery is the faster method, but it returns a non-updateable recordset.  The DMax method is slower, but the recordset is updateable.

HOWEVER, it should be noted that against a large dataset, neither method will be very fast!

Download
Access 2000+ (17 KB): 
http://www.rogersaccesslibrary.com/forum/uploads/5/DaysBetweenQuery.zip - DaysBetweenQuery.zip


-------------
Consider donating $1 per sample downloaded, http://www.rogersaccesslibrary.com/whydonations.htm" rel="nofollow - find out why here .<



Replies:
Posted By: Roger Carlson
Date Posted: 30 Dec 2010 at 9:40am

Update:  Added detailed documentation.



-------------
Consider donating $1 per sample downloaded, http://www.rogersaccesslibrary.com/whydonations.htm" rel="nofollow - find out why here .<



Print Page | Close Window