Results 1 to 2 of 2
  1. #1
    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.

  2. #2
    Join Date
    Nov 2004
    out on a limb
    Provided Answers: 59
    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

    DateDiff ( "d", [fitness date], date())
    returns the number of days between the fitnessdate and the current system 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 30
    as to how you express that in the query designer, I don't know
    I'd rather be riding on the Tiger 800 or the Norton

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts