HI Everyone,
Does anyone have any sugestions on how to update a date/time fuild on SQL server using access VBA. Here is what i have:
If i take the ( TimeStamp = convert(datetime, '05/12/2018'), ) out of it, the update query runs fine so i know that the communication to the SQL server and the query structure is sound.
I have tried following different variations of this code:
Any suggestions on how to make this work?
Does anyone have any sugestions on how to update a date/time fuild on SQL server using access VBA. Here is what i have:
Code:
Dim updTblPrf As String
updTblPrf = "UPDATE tblPRF " _
& "Set PRStatus = 'Complete', TimeStamp = convert(datetime, '" & Now() & "'), AsscName = '" & [Forms]![Switchboard]![txtLogin] & "' " _
& "WHERE PRF_ID = " & Me.PRFNum & ";"
sqlDB().Execute updTblPrf, dbSeeChanges
If i take the ( TimeStamp = convert(datetime, '05/12/2018'), ) out of it, the update query runs fine so i know that the communication to the SQL server and the query structure is sound.
I have tried following different variations of this code:
Code:
TimeStamp = 05/12/2018
TimeStamp = '05/12/2018'
TimeStamp = #05/12/2018#
TimeStamp = convert(datetime, '05/12/2018')
TimeStamp = CONVERT(DATETIME, '2018-05-12 00:00:00', 102)
Any suggestions on how to make this work?