I am not very experienced in VBA. I've been doing traditional VB development for years. I am trying to perform an update of a database field in Access from within an Access module.
db.Open CurrentProject.Connection
sql = "update tblPatientHistoryNew set probdesc = '" & x & "' where patientID = " & Forms!frmPatientList!txtPatientID & " and refdate = #" & Me.HistDate & "#;"
db.Execute sql
note that x contains a very long Base64 string. I am getting a syntax error on the execute method. The weird thing is that I can print the SQL string in the immediate window, put that exact statement in a new Access query and it runs fine. Is my syntax of the execute method incorrect? Thanks.
Glenn
db.Open CurrentProject.Connection
sql = "update tblPatientHistoryNew set probdesc = '" & x & "' where patientID = " & Forms!frmPatientList!txtPatientID & " and refdate = #" & Me.HistDate & "#;"
db.Execute sql
note that x contains a very long Base64 string. I am getting a syntax error on the execute method. The weird thing is that I can print the SQL string in the immediate window, put that exact statement in a new Access query and it runs fine. Is my syntax of the execute method incorrect? Thanks.
Glenn