Sub UpdateEmployee(ID, FName, LName, Dept, Loc, Title)
set conn = server.createobject ("adodb.connection")
conn.open "DataSource"
conn.Execute "update Employees set " _
& "EmpFirstName = '" & FName & "', " _
& "EmpLastName = '" & LName & "', " _
& "DepartmentID = '" & Dept & "', " _
& "LocationID = '" & Loc & "', " _
& "TitleID = '" & Title & "', " _
& "where EmployeeID = " & ID
End Sub
I keep getting a syntax error when I try to update a record. Can someone lead me in the right direction on this?
Comments
"TitleID = '" & Title & "', " _
The comma (,) in the row above has to be removed. That's the only error I found in your code.
/Chris