help need for a query that looks a field date and tells if it is one year past

  • Thread starter Thread starter Bobby
  • Start date Start date
B

Bobby

I need help! I am building a datebase that is used to
track training, with dates entered in a field. I want
query that will search a field and tell me if it greater
than 1 years past the current date. Can someone help me!
I know everything else except how to build a query like
this one.

Thanks much
Bobby
 
Bobby,

Here's one way... In your query, make a calculated field by typing the
equivalent of this in the Field row of a blank column in the query
design grid...
DateTest: DateAdd("yyyy",-1,[YourDateField])
.... and then in the criteria of this column, put...
This will give you records where the date field is "more than one year
in the future", which is what I interpreted your question to mean.
However, if you mean where the date is "more than a year in the past",
than the expression would be...
DateTest: DateAdd("yyyy",1,[YourDateField])
.... and the criteria would be...
<Date()
 
I need help! I am building a datebase that is used to
track training, with dates entered in a field. I want
query that will search a field and tell me if it greater
than 1 years past the current date. Can someone help me!
I know everything else except how to build a query like
this one.

Use a criterion of
DateAdd("yyyy", 1, Date())

to get those values where the datefield is more than one year in the
future from today (I'm not sure what you mean by "1 years past the
current date").
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top