Print Page | Close Window

PreviousDateQuery.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.
Printed Date: 19 Oct 2017 at 5:51pm

Topic: PreviousDateQuery.mdb (beginner)(2000-2007)
Posted By: Roger Carlson
Subject: PreviousDateQuery.mdb (beginner)(2000-2007)
Date Posted: 10 Sep 2009 at 1:21am
Please consider donating $1 per sample downloaded, - find out why here .
PreviousDateQuery.mdb (beginner)
This sample illustrates how to create a Previous Date query.  It shows how to:
 1) Display the previous date in subsquent records of a table
 2) Display the previous date 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!

Access 2000-2007 version: -
NOTE: If you want to know the number of days between the two dates, see my sample: - DaysBetweenQuery.mdb.

Consider donating $1 per sample downloaded," rel="nofollow - find out why here .<

Print Page | Close Window