Automatically changing the date

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi everyone,

Not sure this is possible but what I would like to do is at years end run
some 'Thing' on my DB that will add a field to a table that is year but this
field will also need to be represented in various reports, as an idea of what
I'm trying to is the table contains future build programmes with a 25 year
horizon, so what I would like to do is next year still look at a 25 year
horizon with the starting year being 2006 and ending in 2030 and so on, but I
don't want the previuos years field deleted.

Many thanks in advance
 
You do not, and should not, add a field for each year. A single column in a
query will grab all data withing a 25 year life span. Simply showing the
date column and setting criteria on it is enough. The criteria should read
something like:

Between Date() And DateAdd("yyyy", 25, Date)

which will get all the data between today and 25 years from today.
--
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
 
souchie40 said:
Hi everyone,

Not sure this is possible but what I would like to do is at years end
run some 'Thing' on my DB that will add a field to a table that is
year but this field will also need to be represented in various
reports, as an idea of what I'm trying to is the table contains
future build programmes with a 25 year horizon, so what I would like
to do is next year still look at a 25 year horizon with the starting
year being 2006 and ending in 2030 and so on, but I don't want the
previuos years field deleted.

Many thanks in advance

You don't put that kind of thing in a table. Saving the results of a
computation is almost always wrong. You can accomplish this using VBA in
forms or reports or just using a query and you would not need to save all
that data.
 

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