HELP!!! Where is my error?

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
Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion