Rolling number of days dataset?

razorking

Registered User.
Local time
Today, 09:52
Joined
Aug 27, 2004
Messages
332
First of all, let me apologize for asking such simple stupid questions. Believe it or not I have done some really cool things with Access and then every now and then I seem to get stumped by something that seems like it should be obvious.

Anyway, here is my problem:

I have a table that contains fields that relate to the tracking of errors for a shipping/receiving environment. One of the specific fields is a date field that stores the value of the date the error was noted (called - noted). I then have a form tied to the table where the administrator enters and views the errors. I am trying to figure out a way to have this form only show errors that were entered (noted) for a set number of days - for example 45 days rolling. I do not want to have to enter a beginning and ending date every time, just always show all records where the - noted - date falls within the past 45 days (whether that is 10 records or 110).

Sounds easy...I'm sure it is, however when I set about doing it I get brain freeze (ticks me off, I feel like a moron).

Thanks for reading
 
Last edited:
Could you just place something like myDateFld >= date() - 45 as a parameter on the underlying recordsource?

kh
 
Date

Does this work in a Query?

Between DateAdd ("d", -45, Date()) And Date()

And it's not a stupid question, the only stupid thing to do is not asking questions. :)
 
Seems to have worked on this side :)

kh
 
trucktime said:
Does this work in a Query?

Between DateAdd ("d", -45, Date()) And Date()

trucktime,

I believe that is what I was looking for, at least my initial tests appear positive.

Thank you both for your replies!
 

Users who are viewing this thread

Back
Top Bottom