Delete selected record from form

hduvall

Registered User.
Local time
Today, 15:58
Joined
Jul 22, 2014
Messages
14
I have a simple Form to delete a single record from a table. I have a listbox displaying all records in the table, small number of records. I want to select a record to delete and populate the text boxes in the form. No problem this works. However when I click the delete button only the first record in the table is deleted. I assume that the reason is that my selected record is not the the record in focus. If this the issue how can I set focus on the new record. If it is not the issue, I am open for thoughts and suggestions.

Thanks
 
you are describing what you are doing and your description is confusing so just a wild stab

I would expect your code should be something like

currentdb.execute("DELETE * FROM myTable WHERE PK=" & me.PK)
 
Thanks I figured it out fro one of your FAQs
 

Users who are viewing this thread

Back
Top Bottom