paul.raeburn
PR
- Local time
- Today, 22:39
- 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
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
