Unbound Listbox...

  • Thread starter Thread starter Lynn Pennington
  • Start date Start date
L

Lynn Pennington

Hi.
Looking to remove item from listbox and delete record from
table. The form is bound to the table I need to delete
records from.
Any ideas?
Thanks,
Lynn.
 
Hi Lynn

Assuming the bound column of your listbox contains the primary key value of
the record you want to delete, you can just delete the record and requery
the list:

CurrentDb.Execute "Delete from MyTable where MyKeyField=" & MyListbox
MyListbox.Requery
 
Back
Top