I keep getting syntax error using the following statement. Can anybody tell where exactly is my problem? The values for year, issue, pagenr, horizpos, vertpos, imgbord are numerical values. id is an autonumber in my access database so I assume it is also considered a numerical value for the purpose of SQL statements. The statement is modified from the second listed statement which works fine.
Set objRecordSet = objDataCon.Execute("UPDATE messages SET year = " & year & "," & "issue = " & issue & "," & "pagenr = " & pagenr & "," & "conttype = '" & conttype & "'," & "horizpos = " & horizpos & "," & "vertpos = " & vertpos & "," & "imgbord = " & imgbord & "," & "desc = '" & desc & "'," & "content = '" & page & "' " & "WHERE id = " & id, lRecordsFound)
Set objRecordSet = objDataCon.Execute("UPDATE messages SET ndate = " & dateformat(ndate) & ", title = '" & title & "', message = '" & page & "', file = '" & filename & "' WHERE id = " & id, lRecordsFound)
Set objRecordSet = objDataCon.Execute("UPDATE messages SET year = " & year & "," & "issue = " & issue & "," & "pagenr = " & pagenr & "," & "conttype = '" & conttype & "'," & "horizpos = " & horizpos & "," & "vertpos = " & vertpos & "," & "imgbord = " & imgbord & "," & "desc = '" & desc & "'," & "content = '" & page & "' " & "WHERE id = " & id, lRecordsFound)
Set objRecordSet = objDataCon.Execute("UPDATE messages SET ndate = " & dateformat(ndate) & ", title = '" & title & "', message = '" & page & "', file = '" & filename & "' WHERE id = " & id, lRecordsFound)