View Full Version : Counting back dates in a table


Courtman
12-08-2001, 12:55 AM
I am writing a logbook to keep track of flying hours, and I need to countback in a table to find out when a 90-day period which covers three landings will expire.

So, if I have three entries as follows:

01/12/01
03/12/01
04/12/01

The 90-day period will cover those three, and the 90-day expiry will be 01/03/02.

What I want to do is countback three records, then add 90 days to it. How can I make a query countback three records and give me that result so I can add 90 to it?

Harry
12-10-2001, 06:41 AM
Not sure that I fully understand, but you can make a query show the top three records in the query properties box Top Values. Sort by date

HTH

KKilfoil
12-10-2001, 10:00 AM
Step 1: Create the query as Harry has suggested using the TOP modifier in a select query.

Step 2: Create a summary query to find the MIN of the first query.

Step3: using the query from step 2 as source, create a calculated field that adds
90 to the MIN value found, and display in date format.

Courtman
12-13-2001, 09:04 AM
Harry & KKilfoil

Thanks for the info, that seems to be going in the right way. This was supposed to be an easy project, I seem to find hurdles after hurdles at the moment!! http://www.access-programmers.co.uk/ubb/smile.gif http://www.access-programmers.co.uk/ubb/smile.gif http://www.access-programmers.co.uk/ubb/smile.gif

[This message has been edited by Courtman (edited 12-13-2001).]