I am trying to update a recordset using VBA based on the max "process instance" from another table. After the code executes, the field I am updating is still blank.
Code:
Set rs = db.OpenRecordset("myTable", dbOpenDynaset)
If Not (rs.BOF And rs.EOF) Then
rs.MoveFirst
Do Until rs.EOF = True
emplid = rs![Employee Number]
lname = rs![Last Name]
fname = rs![First Name]
srSQl = "select max(process_instance) from member_tbl where emplid = '" & emplid & "' and lname = '" & lname & "' and fname = '" & fname & "'"
'MsgBox srSql
updateProc = "Update myTable Set process instance = '" & srSQl & "'"
rs.Edit
rs![Process Instance] = updateProc
rs.Update
rs.MoveNext
Loop
End If
rs.Close