Change your "rec.Open" statement to be:
Code:
rec.Open "select * from Account", str, adOpenKeySet, adLockOptimistic, adCmdText
If you're not using the ADO VBS Constants, you'll need to put these before your "Open" statement
Code:
Const adOpenKeySet = 1
Const adLockOptimisitc = 3
Const adCmdText = &H0001
adOpenKeySet opens the recordset to be updatable. The default is "adOpenStatic" which is a disconnected recordset. Records added/modified/deleted to the DB at the same time by another user/process are not accessible in this cursor type. Use "adOpenDynamic" with a value of "2" if that is needed.
adLockOptimistic locks the record only when it's being updated.
adCmdText provides a hint to the Open method that the string being executed is SQL