Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

How make end date 1 year after start date

Posted on 2014-01-18
6
Medium Priority
?
480 Views
Last Modified: 2014-01-18
I have two date fields on a form.  If I enter, for example 7/1/2013 in the start date field I want the end date field to be one year after the start date.

What is the after update code for the start date field?
0
Comment
Question by:SteveL13
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
6 Comments
 
LVL 120

Accepted Solution

by:
Rey Obrero (Capricorn1) earned 2000 total points
ID: 39790816
=dateadd("yyyy", 1, [StartDate])
0
 

Author Comment

by:SteveL13
ID: 39790818
Will that also account for leap year?
0
 

Author Comment

by:SteveL13
ID: 39790824
And I had to add

-1

to the end.
0
U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 39790825
what exactly do you mean?

this

dateadd("yyyy",1,date())
1/18/2015


dateadd("yyyy",1,date()-1)
1/17/2015
0
 

Author Comment

by:SteveL13
ID: 39790834
What I mean is if I start with 7/1/2013 and want to end with 6/30/2014 I have to have:

    Me.txtEndDate = DateAdd("yyyy", 1, [txtStartDate]) - 1

It works!
0
 
LVL 120

Expert Comment

by:Rey Obrero (Capricorn1)
ID: 39790839
that is correct...
0

Featured Post

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article describes a method of delivering Word templates for use in merging Access data to Word documents, that requires no computer knowledge on the part of the recipient -- the templates are saved in table fields, and are extracted and install…
Microsoft Access is a place to store data within tables and represent this stored data using multiple database objects such as in form of macros, forms, reports, etc. After a MS Access database is created there is need to improve the performance and…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

718 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question