06-21-15, 23:06 #1Registered User
- Join Date
- Jun 2015
Unanswered: Limiting a query to a specific date parameter
I'm building a vehicle database in Access 2013 that includes warrant of fitness dates information.
At the moment my query is very basic and simply returns a list of warrant of fitness dates.
I'd like to be able to refine the query so that it only displays cars that are due for a new warrant of fitness.
Ideally I'd like the query to search for vehicles where there is say, a month between the date due for the warrant
and the current date, so the warrant can be completed well before it expires.
Is there an easy way to do this in a query, or do I have to use some form of programming to make it work?
The form is called Vehicles and the date field where the Warrant of Fitness date is stored is called WOF Due.
06-22-15, 07:04 #2Jaded Developer
Provided Answers: 59
- Join Date
- Nov 2004
- out on a limb
use a query
its all down to the where clause (bear in mind I use SQL directly NOT the query designer) so you will need to do some work yourself
assuming that your 'fitness date' is actually stroed in a datetime column then use the appropriate date/time function. see https://www.google.co.uk/webhp?sourc...+function+2013
DateDiff ( "d", [fitness date], date())
but you also need to exclude those whose fitness date is in the future, so your final expression will be somethign like
where DateDiff ( "d", [fitness date], date()) between 0 and 30I'd rather be riding on the Tiger 800 or the Norton