Results 1 to 5 of 5
  1. #1
    vdanelia is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Jan 2011
    Posts
    38

    Help in Solving Warranty Period in Access

    Hello Dear friends i have to make Automated product Guarantee period.
    And Need instruction how to create Event Procedure for it



    I have 3 Text boxes on the form connected with table...
    1. Text Box [Date of Purchase] - In this text box is indicated date of buy (1/19/2011)

    2. Text Box [Warranty] - (In this text box is indicated period year in numbers, if it is One year there is "1"
    3. Text Box [ExpWarranty] - (In this text box is indicated the year when the Warranty period will expire) for example - 1/19/2012

    And When I enter the date of purchase (1/19/2011) and indicate year (1) in the last text box automatically must gave (1/19/2012)

    Thank you in Advanced

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Use the DateAdd() function and I would use it in the RecordSource Query rather than on a form.

  3. #3
    vdanelia is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Jan 2011
    Posts
    38
    Hello Friends... I Wrote something like:


    Me.WarrantyExpDate = DateAdd("yyyy", Me.NumberOfYears, Me.PurchaseDate)


    It works well, but i don't know how to calculate warranty in months.. for example if i buy a product and if the warranty period is 6 months what to do then ...

    In my case i wrote 0.6 in DateAdd, but dindn't calculate anything, Please help!

    Also Is there a way i can set a function where when a product warranty is expiring within 30 days a reminder is displayed on the main menu, or that i could click button and see all the products which are expiring within 30 days?

    Thank you In advanced, waiting from you as soon as possible

  4. #4
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2010 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Try: DateAdd("mm", Me.NumberOfMonths, Me.PurchaseDate)

  5. #5
    vdanelia is offline Advanced Beginner
    Windows 7 32bit Access 2007
    Join Date
    Jan 2011
    Posts
    38
    Thank you "RuralGuy" It worked Well...

    Please Rename The Thread I wrote Guarantee instead of Warranty
    and you can mark this thread as "Solved"

    Thank you very much

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Count Items by Time Period
    By pawslover in forum Queries
    Replies: 1
    Last Post: 11-15-2010, 03:57 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums