Roger's Access Library Homepage
Forum Home Forum Home>Roger's Access Library>Roger's Download Samples
  Active Topics Active Topics
  FAQ FAQ  Forum Search   Calendar   Register Register  Login Login

PreviousDateQuery.mdb (beginner)

 Post Reply Post Reply
Author
Message
  Topic Search Topic Search  Topic Options Topic Options
Roger Carlson View Drop Down
Microsoft MVP
Microsoft MVP


Joined: 20 Feb 2008
Online Status: Offline
Posts: 217
  Quote Roger Carlson Quote  Post ReplyReply Direct Link To This Post Topic: PreviousDateQuery.mdb (beginner)
    Posted: 10 Sep 2009 at 9:21am

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
or
 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 version: PreviousDateQuery.zip
 
NOTE: If you want to know the number of days between the two dates, see my sample:  DaysBetweenQuery.mdb.
Please consider donating $1 per sample downloaded, find out why here.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Bulletin Board Software by Web Wiz Forums® version 9.06
Copyright ©2001-2007 Web Wiz