Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

update date field

Status
Not open for further replies.

CHTHOMAS

Programmer
Jun 16, 1999
106
AE
I do have a little problem with an update query to update date field. What i want to do is after performing certain calculation, increment the date field in a table by an year.(ie 2000 to 2001). In the table, i am using dd/mm/yyyy format for the date field. The update to field of the query is like UPDATE (YEAR FIELD OF TABLE EMP MAST) TO DateAdd(&quot;yyyy&quot;,1,[EMP MAST]![YEAR]).<br>
My problem is that while updating some rows are updated correctly, some rows gives unexpected results. (ie when trying to<br>
update year 2000, for most of the employees i am getting 2001, but for some i am getting years like 2011,2014 etc.). I checked and<br>
made sure that there are no criteria in the query.
 
Take a look at [EMP MAST]![YEAR] for an employee that has a bad date and then look at it for a good one.<br>
I supect that you will find your problem there.<br>

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top