Simple Question (I think)

Playbus

Registered User.
Local time
Today, 08:34
Joined
Sep 17, 2004
Messages
23
I have a table which has a date/time field (both the date and time in same field) which specifies when an item was recieved. This is automatically added to the record when the other fields are entered by the user -- it is entered as "=now()" and cannot be altered by the user.

I need to make a query which will only brings up records which are between a set number of days old.

Example, how many items were recieved more than 7 days ago but less than 14?

Or how many items were recieved more than 14 days ago but less than 28?

I hope you see what I mean.

I'm not sure how to achieve this.

Can someone help me please?
 
in the criteria of your query you can put:

Between #Date# And #Date#
 
Hmm that doesn't sound like it will work in my case.

I don't want to ask the database "How many items were recieved between #date# and #date#" --- because I don't want to type dates in to run the query every time I run it.

I want the database to compare the Date Recieved field on each record with todays date (IE the date the query is run on) and tell me the difference. (So effectively working out how old each item is at the moment the query is run)

I also want to sort results into groups, IE

More than 7 days old
More than 14 days old
More than 28 days old
etc

I think I will need a seperate query for each group but that isn't a problem. I just need the age-calculation for each record.

Hope this makes more sense now.
 
Last edited:
Nevermind, I have worked it out now.

Thanks anyway.
 

Users who are viewing this thread

Back
Top Bottom