Unbound Listbox...

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.
 
G

Graham Mandeno

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
 
Top