DateAdd Function doesn't work in 2010?

Shannon3778

Registered User.
Local time
Today, 13:58
Joined
Dec 13, 2012
Messages
29
I'm trying to produce a calculated field in my table that will calculate the next month (same day) as another field in my table and cannot find the function to produce this result... the dateadd function doesn't seem to work in 2010 access and I'm stuck!!! Help please??

Oh, and in the event that the original date was, for instance, 1/31, I know that obviously the result couldn't be 2/31 so it would just need to show 2/28... I've been working on this for weeks and cannot figure this one field out... :banghead:
 
2/31 doesn't look like a fully formed date to me :confused: perhaps it is a string that represents a partial date.

If that is the case that would explain why DateAdd() is not working
 
it's not the 2/31 that isn't working... its that when I attempt to put in dateadd, it doesn't show as a valid funtion in 2010 acess... maybe I'm entering it in incorrectly... The field I'm basing it on is a date field called "date_implemented". I need a formula for a calculated field that will show the same day of the next month... so, if the implemented date is 1/5/2013 then the calculated field needs to return 2/5/2013. The closest I've been able to get is date+30, but that isn't always (rarely ever actually) the same day of the next month... my boss is adamant that he wants it the same day of the next month, not just 30 days later.... :confused:
 
Where are you try to use it? As I know for certain that DateAdd() does work in Access '10.
 
I'm attempting to use it for a calculated field in my main table...
 
given a date, you need to add a whole month

newdate = dateadd("m",1,olddate)

eg try this

MsgBox (DateAdd("m", 1, Date))
 
Everytime I enter in the dateadd("m",1,[date_ mplemented])) formula for the calculated field I get an error that says " The expression dateadd("m",1,[date_ mplemented])) cannot be used in a calculated column...???
 
You should not be attempting to store this calculated field in the table, it can easily be calculated if required eg for viewing in a report or form and users should not see tables only reports or forms.

Brian
 
I've been trying to have it show in my table when all along I should have just been creating a query and then running the report from the query...such an easy fix... guess I'm showing how new at this I am... Thanks for the help!
 

Users who are viewing this thread

Back
Top Bottom