Cannot Delete Record

Local time
Today, 11:18
Joined
Apr 29, 2001
Messages
47
I have a form with two list boxes in it. When a user double clicks a name in the left hand list box, that name is then place in the right hand box.

I am trying to allow the user to remove that name if a mistake has been made. The code I am using is below.

Private Sub ListBoxGarther_DblClick(Cancel As Integer)
'to delete records from the list box that holds temp records before update
Dim db As Database
Dim rst As Recordset
Dim MemNo As Long

MemNo = Me.ListBoxGarther
Set db = CurrentDb
Set rst = CurrentDb.OpenRecordset("tbl_temp_bank_statement")
' Delete the Member_Detail record with the specified ID
' number.

DeleteRecord rst, MemNo
Me.ListBoxGarther.Requery

End Sub :confused:
 

Users who are viewing this thread

Back
Top Bottom