1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Access 2003 Date Addition help.

Discussion in 'Business Applications' started by dragonlight, Jul 10, 2006.

Thread Status:
Not open for further replies.
Advertisement
  1. dragonlight

    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.
     
  2. OBP

    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.
     

    Attached Files:

  3. dragonlight

    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.
     
  4. coachdan32

    coachdan32

    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.
     
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 733,556 other people just like you!

Loading...
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/482171

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice