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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top