Re: Flag particular dates



you can use the datediff function:
datediff("w", now(),ExpDate)
will tell you the number of weeks between todays date and the expiration
date. If you want to see all records where this is less than or equal to 4,
you can put this in the criteria for the ExpDate field in a query
datediff("w", now(),ExpDate) <= 4
or you could say
datediff("w", now(),ExpDate) <= [enter number of weeks]
and it will ask you each time you run the query how many weeks you are
interested in.
for more info, look at datediff function in visual basic help. If you don't
know how to get to vb help, click on modules, in main db window, then say
new and then you should get a menu that has help.
hope this helps

"Steve" <slp@xxxxxxxxxxxxxxx> wrote in message
news:e81qis$iv$1@xxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I have set up a db at work, I work in a flying school. All students and
other pilots are included in this db, along with particulars such as
Medical Certificate expiry date. I need to have the db 'flag' those people
whos medical certificates will expire in say, 4 weeks time. Any help in
setting this up would be appreciated, or perhaps if there are any
publications I could buy, I would appreciate the information. Location:
Adelaide, South Australia.



.



Relevant Pages

  • RE: counting days worked per month
    ... Look in VBA Help for the DateDiff function. ... Here is an example of how it can be done in your query: ... "Stuff3" wrote: ... It is not necessary to exclude weekends or ...
    (microsoft.public.access.queries)
  • Re: Transposing rows into columns
    ... Marshall Barton wrote: ... I am just having trouble making it transpose from rows ... I tried to use the DateDiff function in the PIVOT statement of the ... query and can't get it to work. ...
    (microsoft.public.access.queries)
  • Re: Transposing rows into columns
    ... Marshall Barton wrote: ... I am just having trouble making it transpose from rows ... I tried to use the DateDiff function in the PIVOT statement of the ... query and can't get it to work. ...
    (microsoft.public.access.queries)
  • Re: How To Name Columns With Code
    ... The Month function is going to be your friend, ... DateDiff function. ... how do I get a query to return the months all on the same ... I will be using these renamed column names in computations as well. ...
    (microsoft.public.access.modulesdaovba)
  • Re: Datediff, if field is blank
    ... Bjarni wrote: ... >datediff function in a case when field is blank. ... >CO Sign Off Date have dates in them, otherwise my query ... MVP ...
    (microsoft.public.access.formscoding)