Solved it!
My error was I used the value in textbox6 as my search criteria and not the value in textbox1.
Just fyi, my final code now is:
Dim i, SAP, sName, pCode, sCode, Mgr As String
i = TextBox1.Text
SAP = TextBox6.Text
sName = TextBox2.Text
pCode = TextBox3.Text
sCode = TextBox4.Text
Mgr = TextBox5.Text
With cmd
.ActiveConnection = conn
.CommandText = "SELECT * FROM dbase where SAP_ID = " & i & ";"
.CommandType = adCmdText
End With
With rs
.CursorType = adOpenStatic
.CursorLocation = adUseClient
.LockType = adLockOptimistic
.Open cmd
End With
Do While Not rs.EOF
rs("SAP_ID").Value = SAP
rs("Staff_Name").Value = sName
rs("Station_Code").Value = sCode
rs("Position_Code").Value = pCode
rs("Line_Manager").Value = Mgr
rs.Update
rs.MoveNext
MsgBox "Update successful!", vbInformation, ""
Loop
End If
rs.Close
Set rs = Nothing
conn.Close
Set conn = Nothing
Bookmarks