It appears that I am going to struggle to get every SQL statement I ever write to work 1st time! At present I have the code below but seem to get a 3001 error - "Arguments are of the wrong type, are out of acceptable range or are in conflict with another".
txtUsername variable value is "simonwait"
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")
'Now open the connection.
' Assign the Connection object.
.ActiveConnection = enPubs
' Update the required records.
.Update "Users SET Removed=1 WHERE Username='" & txtUsername & "'"
Set rsPubs = Nothing
Set enPubs = Nothing