473,403 Members | 2,293 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

Add Months to a Date in Access 2007

I need to add a number of months (entered into a field as "Term (Months)" and set as a number) to a date field to derive a new date field. For example:

Field 1 Move-In Date: 3/1/2014
Field 2 Term (Months): 60
Field 3 Lease Expiration: 2/28/2019 (this is the date I'm trying to calculate)

Thanks for your help. I am a total Access n00b and am building a comp database from scratch for the CRE firm I work for. I have managed to successfully do everything except this. :)
Mar 25 '14 #1
4 2385
zmbd
5,501 Expert Mod 4TB
I'll PM you a set of links and tools that you should find helpfull.

As for the calculation, normally one does not store calculated results; thus, in your case, in the table, store the move_in date and the term (ie: 36 months)

Now in a query, add your table, select the correct fields and then use the dateadd() (ACC2007/2010) function in a calculated field (Allen Browne)

If you have any difficulties in accomplishing this please let us know, and check you Bytes inbox (^_^)
Mar 25 '14 #2
Seth Schrock
2,965 Expert 2GB
The function that does this is the DateAdd() function.
Expand|Select|Wrap|Line Numbers
  1. DateAdd("m", 60, #3/1/14#) = 3/1/2019
  2. DateAdd("d", -1, #3/1/19#) = 2/28/2019 
However, there are multiple ways of implementing this (in a query, in the form, etc.). As it would break Database Normalization Rules to store a calculated field, it would probably be best done in a query, but that depends on the situation and preference.

Since you are new to Access, I would highly recommend reading through the database normalization link above as it will help you keep problems at bay and make it easier to build upon in the future if necessary.
Mar 25 '14 #3
zmbd
5,501 Expert Mod 4TB
Looks like I cross posted with you Seth, right at 4 minutes on the posting times (^_^)
Mar 25 '14 #4
Seth Schrock
2,965 Expert 2GB
Great minds think alike :)
Mar 25 '14 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

49
by: Allen Browne | last post by:
If you are looking for opinon on what's useful in Access 2007, there's a new article at: http://allenbrowne.com/Access2007.html Covers what's good (useful features), what's mixed (good and bad),...
1
by: zuchowra | last post by:
Hello everyone Im running Access 2007. I made a sweet Data base that works flawless however, not all out computers will have access 2007. Their is some features in access 2007 in my database that...
5
by: LadyIlsebet | last post by:
I'm not a fantastic Access developer, but I'm trying to help get Inventory and whatnot organized at work. They are used to 5 year budget plans that list out exactly what has to be purchased what...
10
by: Lou O | last post by:
I have been using Access 2007 for a number of months and have successfully deployed ACCDR files on many client machines. The client machines have the "free" Access runtime version installed. I...
1
by: PatdeLux | last post by:
Hi, I have have an Access 2003 application with Sql Express as back end. After migrating the front end to Access 2007, users have a serious problem: One form contains text controls bound to...
9
by: prakashwadhwani | last post by:
Hi !! I'm about to develop a new project for a client. Should I go about it in Access 2003 or 2007 ? Purchasing it either for me or for my client is not a major consideration here ... what I'd...
2
by: Mimi | last post by:
In Access 2007, I have successfully imported a text file with fixed width fields. However the import did not correctly interpret a date. In the text file the date field had no delimiter, was just...
1
newnewbie
by: newnewbie | last post by:
Hi, Short version: trying to export more than 65K of data from Access 2007 into Excel 2007 (important) through VBA. Access gives me 65K row limitation error, though I thought that was no longer...
2
by: Andy Briggs | last post by:
Hello all, I have a problem with distributing an Access 2007 application with the latest version of Access 2007 Runtime. What is happening that a date field on a form, whose default value is...
2
by: kawprice60 | last post by:
I am a new user to Access 2007. I have to design a report that uses date prompts. My database has the following fields: date, total, under 30, service level I need to make a calculation on...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.