Solved

DateAdd returns 12/30/1899

Posted on 2008-10-23
7
250 Views
Last Modified: 2013-11-29
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?
0
Comment
Question by:cebaker75
  • 4
  • 2
7 Comments
 
LVL 92

Assisted Solution

by:Patrick Matthews
Patrick Matthews earned 250 total points
ID: 22786821
What was the original value in StartDate?
0
 

Author Comment

by:cebaker75
ID: 22787583
"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.
0
 
LVL 92

Assisted Solution

by:Patrick Matthews
Patrick Matthews earned 250 total points
ID: 22787605
Ok.  What data type are you using for StartDate?
0
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 
LVL 119

Accepted Solution

by:
Rey Obrero earned 250 total points
ID: 22787755
can you post the content of your macro
0
 

Author Comment

by:cebaker75
ID: 22787774
Date/Time
0
 

Author Comment

by:cebaker75
ID: 22788052
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.
0
 

Author Comment

by:cebaker75
ID: 22788060
Thanks to all!
0

Featured Post

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

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

When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.

920 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now