Hi,
I am trying to update a date field in a table with a sql dateadd based on another date field in the same table. I have it within a RunSQL statement.
I cannot seem to get the SQL DATEADD function to workl within the RunSQL.
This is what I have currently:
DoCmd.RunSQL "UPDATE tblShields " & _
"SET 6mth_review = Dlookup(""DATEADD(month,6,tblShields.date_applied)"",""tblShields"") " & _
"WHERE tblShields.shield_ID = (SELECT MAX(shield_ID) FROM tblShields)"
Any ideas how I can get this update to work?
Cheers
I am trying to update a date field in a table with a sql dateadd based on another date field in the same table. I have it within a RunSQL statement.
I cannot seem to get the SQL DATEADD function to workl within the RunSQL.
This is what I have currently:
DoCmd.RunSQL "UPDATE tblShields " & _
"SET 6mth_review = Dlookup(""DATEADD(month,6,tblShields.date_applied)"",""tblShields"") " & _
"WHERE tblShields.shield_ID = (SELECT MAX(shield_ID) FROM tblShields)"
Any ideas how I can get this update to work?
Cheers