I have a simple VBA code that makes me update a database table with update statement . the field I want to update is date/time so the code I use is :
Public myDate, renewalDate As Date
Public Sub Renewal()
renewalDate = DLookup("renewalDate", "tblDate", "[id]=1")
Dim newDate As Date
Serial = "123456789"
If Forms![frmRenewal]![txtSerial] = Serial Then
newDate = DateAdd("m", 1, renewalDate)
MsgBox newDate
DoCmd.SetWarnings (False)
DoCmd.RunSQL "Update tblDate SET tblDate.renewalDate = newDate WHERE (((tblDate.id)=1))"
MsgBox "You successfully renewed your subscription and renewal date is now " & renewalDate
Else
MsgBox "Wrong Serial"
End If
End sub
and here is the database table:
and I get this error when I run the code

