G
Guest
I am trying to update a field in an access table with a variable. I am
deleting out a date table and trying to replace it w/ the variable "RunDate",
I think I am missing adding in the # before and after RunDate, but I have
tried this in multiple places and keep getting a compile error. Below is
what I have, any help would be appreciated.
CurrentDate= Format(Date, "Short Date")
RunDate = DateAdd("D", -2, CurrentDate)
selString = "update PARM_RunDt_tbl set RunDt = " & RunDate & ""
DoCmd.SetWarnings False
DoCmd.OpenQuery "PARM_RunDt_tbl - Delete", acNormal, acEdit
DoCmd.RunSQL selString
deleting out a date table and trying to replace it w/ the variable "RunDate",
I think I am missing adding in the # before and after RunDate, but I have
tried this in multiple places and keep getting a compile error. Below is
what I have, any help would be appreciated.
CurrentDate= Format(Date, "Short Date")
RunDate = DateAdd("D", -2, CurrentDate)
selString = "update PARM_RunDt_tbl set RunDt = " & RunDate & ""
DoCmd.SetWarnings False
DoCmd.OpenQuery "PARM_RunDt_tbl - Delete", acNormal, acEdit
DoCmd.RunSQL selString