Add year to Date and return changed date field as a result

mje_1964

New Member
Joined
Mar 25, 2011
Messages
4
Hi- I am new to the forum and relatively new to Access.

I have taken a few Access courses and am trying to finish up my 1st major Access project. I am stuck on one thing and am hoping for a little bit of guidance.

I saw alot of posts about dates, but none that dealt with what I want to try to do.

I have a date that a survey was completed in my final report. I want to show this date on the report, but if it has been more than 1 year since the date I want the date to be highlighted so our consultants know they need to make a new visit to the customer.

I think I need to use something like:

([DATE]+365>Date(),

But after this, I get stuck at what I need to do next.

I'm hoping someone will be gracious enough to assist me.

Thanks in advance for any advice you have to offer.
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
If you're doing this in an Access Report, select the control for [DATE] on the report, then use Conditional Formatting. Under "Condition 1" change it to "Expression is", then in the space next to that, insert [DATE]+365>Date(). Just below, you have all kinds of easy-to-use formatting tools to change the appearance of your [DATE] and its background.

Hope this helps...
Phil.
 
Upvote 0
Phil-

Thanks- I guess I was thinking I was going to write this into the query- writing it into the report makes all the sense in the world. Not sure why I didn't think of that.

In case anyone else tries to do something similar- there was one flaw in my original thinking: the formula will need to read: [DATE]+365<Date() If you choose to have it be > than today's date, everything meets the condition.

Again- thanks for steering me in the right direction. One of the things about being a newbie is that I have an idea of what I want to do- I just don't always know where to do it!
 
Upvote 0
Just a suggestion but I would not use Date()+365. I would use DateAdd("yyyy", 1, Date()) as that will also take into account leap years.
 
Upvote 0

Forum statistics

Threads
1,223,098
Messages
6,170,106
Members
452,302
Latest member
TaMere

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top