PC Review


Reply
Thread Tools Rate Thread

date question for a form

 
 
=?Utf-8?B?TmVlZCBBY2Nlc3MgSGVscA==?=
Guest
Posts: n/a
 
      12th Jul 2007
on my form i am try to build a part that adds two other parts together but it
is adding the wrong parts. i have a life expectancy of product section, and
i want this to add to a section i have that has date item was put in to use
and the resulting field is needed replace date. the problem is that the life
expectancy is adding the days not the years. this is what i have for the
expression builder but it is adding the days like 5/5/2005 + 7 = 5/12/2005
when i want 5/5/20012 as an answer
=[Date Item was put in to use]+[Life Expectency of Unit (in Years)]
 
Reply With Quote
 
 
 
 
=?Utf-8?B?T2ZlciBDb2hlbg==?=
Guest
Posts: n/a
 
      12th Jul 2007
The + will add as days, use DateAdd function instead

=DateAdd("yyyy",[Life Expectency of Unit (in Years)],[Date Item was put in
to use])

"yyyy" - specify that you want to add it as years

--
Good Luck
BS"D


"Need Access Help" wrote:

> on my form i am try to build a part that adds two other parts together but it
> is adding the wrong parts. i have a life expectancy of product section, and
> i want this to add to a section i have that has date item was put in to use
> and the resulting field is needed replace date. the problem is that the life
> expectancy is adding the days not the years. this is what i have for the
> expression builder but it is adding the days like 5/5/2005 + 7 = 5/12/2005
> when i want 5/5/20012 as an answer
> =[Date Item was put in to use]+[Life Expectency of Unit (in Years)]

 
Reply With Quote
 
Allen Browne
Guest
Posts: n/a
 
      12th Jul 2007
Use DateAdd(), e.g.:

DateAdd("yyyy", [Life Expectency of Unit (in Years)], [Date Item was put
in to use])

--
Allen Browne - Microsoft MVP. Perth, Western Australia
Tips for Access users - http://allenbrowne.com/tips.html
Reply to group, rather than allenbrowne at mvps dot org.

"Need Access Help" <(E-Mail Removed)> wrote in
message
news:83FDA2B7-B1F5-495C-938D-(E-Mail Removed)...
> on my form i am try to build a part that adds two other parts together but
> it
> is adding the wrong parts. i have a life expectancy of product section,
> and
> i want this to add to a section i have that has date item was put in to
> use
> and the resulting field is needed replace date. the problem is that the
> life
> expectancy is adding the days not the years. this is what i have for the
> expression builder but it is adding the days like 5/5/2005 + 7 = 5/12/2005
> when i want 5/5/20012 as an answer
> =[Date Item was put in to use]+[Life Expectency of Unit (in Years)]


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DATE IN TEXT FORM - NEED TO CHANGE IT DATE FORM SSJ Microsoft Excel New Users 3 27th Oct 2006 08:34 PM
Re: Access 2000 Form Date question Ken Snell [MVP] Microsoft Access Forms 0 16th Sep 2005 09:51 PM
Form Question (no with correct date) Thanks Miguel Dias Moura Microsoft VB .NET 1 3rd Jun 2004 08:36 PM
Form Question (no with correct date) Thanks Miguel Dias Moura Microsoft ASP .NET 0 3rd Jun 2004 06:08 PM
Re: Form question with date and email Jack H Microsoft Word Document Management 2 24th Jul 2003 03:39 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:25 PM.