Dim rsPubs As ADODB.Recordset
Set rsPubs = New ADODB.Recordset
Dim enPubs As ADODB.Connection
Set enPubs = New ADODB.Connection
If txtUsername = "" Then
MsgBox ("No user selected")
Exit Sub
End If
'Now open the connection.
enPubs.Open strConn
With rsPubs
' Assign the Connection object.
.ActiveConnection = enPubs
' Update the required records.
.Update "Users SET Removed=1 WHERE Username='" & txtUsername & "'"
.Close
End With
dnPubs.Close
Set rsPubs = Nothing
Set enPubs = Nothing
|