S
Scott
I'm trying to update the current record on a form in my ADP database. I'm
getting an error saying "operation is not allowed when the object is closed"
on my code below. Can some edit my code so the update sql will update the
record?
CODE *********
Dim rst As ADODB.Recordset
Dim intCounter As Integer
Set rst = New ADODB.Recordset
rst.ActiveConnection = CurrentProject.Connection
rst.CursorType = adOpenDynamic
rst.LockType = adLockOptimistic
rst.Open "UPDATE myTable SET myTable.adminID = '1' WHERE
myTable.userID=" & [Forms]![frmUsers]![userID]
rst.close
Set rst = Nothing
getting an error saying "operation is not allowed when the object is closed"
on my code below. Can some edit my code so the update sql will update the
record?
CODE *********
Dim rst As ADODB.Recordset
Dim intCounter As Integer
Set rst = New ADODB.Recordset
rst.ActiveConnection = CurrentProject.Connection
rst.CursorType = adOpenDynamic
rst.LockType = adLockOptimistic
rst.Open "UPDATE myTable SET myTable.adminID = '1' WHERE
myTable.userID=" & [Forms]![frmUsers]![userID]
rst.close
Set rst = Nothing