I have come with this code, but it can only work on 2002 version of Access. The version I have is 2000. This is the code:
Dim intRecordID as Long, rst as ADODB.recordset
Dim strsql as string
intRecordID = me.list0
Set rst = New ADODB.Recordset
With rst
.activeconnection = currentproject
.connection
.locktype = adOptimistic
.cursortype = adForwardOnly 'I cant remember if this is the exact name of the constant
strsql = "SELECT * FROM tbl_tablename WHERE tblIDFIELD = " & intRecordID
.open strsql
.delete
.update
.close
End With
Set rst = nothing
Me.list0.RemoveItem (intRecordID)
end sub
Do you have any ideas on how to modify it to work?
James
Dim intRecordID as Long, rst as ADODB.recordset
Dim strsql as string
intRecordID = me.list0
Set rst = New ADODB.Recordset
With rst
.activeconnection = currentproject
.connection
.locktype = adOptimistic
.cursortype = adForwardOnly 'I cant remember if this is the exact name of the constant
strsql = "SELECT * FROM tbl_tablename WHERE tblIDFIELD = " & intRecordID
.open strsql
.delete
.update
.close
End With
Set rst = nothing
Me.list0.RemoveItem (intRecordID)
end sub
Do you have any ideas on how to modify it to work?
James