Link to home
Start Free TrialLog in
Avatar of cebaker75
cebaker75

asked on

DateAdd returns 12/30/1899

I have a date field that needs to be updated.  I created a query with criteria that my field [StartDate] is = or < date() -365.  This returns only the records that are 1 year or older. I then used the query to make thae form.  What I'm trying to do is increase that [StartDate] by 1 year on the form.  I am using a macro set the value, and the value I'm using is:  DateAdd("yyyy",1,[StartDate]), but I get the 1230/1899 date.  What am I doing wrong?
SOLUTION
Avatar of Patrick Matthews
Patrick Matthews
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of cebaker75
cebaker75

ASKER

"10/22/2007" is the date I am testing.  I've changed my query criteria to DateAdd, thinking it was a format issue, but I get the same result.  I should be getting "10/22/2008", at least that's what I want to get.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Date/Time
Well, nevermind.  I copied my setvalue formlua from the macro that wasn't working into a new macro (copy and paste) and it now works???  I have no idea why it didn't work in the first macro, it was the only item in the macro.
Thanks to all!