Access 2003 Date Addition help.

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

dragonlight

Thread Starter
Joined
May 30, 2002
Messages
347
I have an access form, I have three fields in this form.
"Warranty Start Date" ( I type in the date when the item was sold.
"Warranty Length" (This is how many years the warranty is) (normally "3yrs"
"Warranty Status" ( I have this formated so that if it's in warranty, the color is green, out of warranty, it's red.)

What I would like to do is; manually enter the date in Warranty start date, then have warranty length defaulted to 3yrs (already have that), then an equation that would take the warranty start date, add 3yrs to it and auto place it into the warranty status field.

Any help would be great.
 

OBP

Joined
Mar 8, 2005
Messages
19,895
Chad, is the Warranty Status field a text field?
If so what "words" do you placed in there dependent on the "in" or "out" of warranty?
Do you want it to happen as you enter the data on the form or is the next time that you view the data OK?
If it is the latter then the attached database demonstrates how to do it with VBA in the Form's "On Current" event procedure.
It hasn't got any error checking built in, for instance if either the date or the warranty period is not filled in it will cause an error, but that is simple to do.
 

Attachments

dragonlight

Thread Starter
Joined
May 30, 2002
Messages
347
Sorry, I didn't get back right away, very busy summer. This is on the lines of what I am looking for, but I would like the field that you have "in warranty" or "out of warranty" to have the date that is typed in, and then add the 3 or how many ever years are in the warranty field added to the final year. So if I type in 7/7/2006, then 3 Years, I would like the final feild to be 7/7/2009 and be green untill that date comes around, then when it comes and goes, the feild will be red.

thank you in advance.
 
Joined
Nov 13, 2003
Messages
1,021
You would want it to be in warranty until 7/8/2009, wouldn't you? The anniversary date should still be under warranty I would think.
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Members online

Top