error in updatequery

mohamedmatter

Registered User.
Local time
Today, 15:00
Joined
Oct 25, 2015
Messages
122
i create update query to update fieldname DateOfTraining to 1/1/1999 but display error in query Group_A 30/12/1899 where error
i attach simple database
 

Attachments

Attachments

  • 2018-11-04_08h21_40.png
    2018-11-04_08h21_40.png
    43.7 KB · Views: 83
replace your Update To field with:

IIf(Nz([DateOfTraining],0)<#1/1/1999#,#1/1/1999#,[DateOfTraining])
 
You update tables, not queries?
 
The same was my immediate response, but you can actually update a query, which then writes the values in the table. Therefore I deleted my response, but apparently not fast enough because OP had seen it.
 
The problem is that there are some minutes value in the "DateOfTraining" field.
Therefore the update query doesn't update because it has the criteria "IIf([DateOfTraining] Is Null .." and it isn't Null because of the minutes value.
 
That might be as the o/p was placing 1/1999 in the field initially?

The problem is that there are some minutes value in the "DateOfTraining" field.
Therefore the update query doesn't update because it has the criteria "IIf([DateOfTraining] Is Null .." and it isn't Null because of the minutes value.
 

Users who are viewing this thread

Back
Top Bottom