delete tbl record based on "OK" selection from Message Box

B

Brook

good day all,

I have a tblinvoicedetails that is set up to add records to invoices
through a frmivoices & subforminvoicedetails.

subforminvoicedetails subform performs a lookup on the tblinventory and the
user selects the records for the invoice which adds them to the invoice and
tblinvoicedetails.

tblinvoicedetails has serial#, and other item details, and is indexed with
NO duplicates allowed.

if the user selects a record that is already located in the
tlbinvoicedetails, how can the user select to delete it from the tbl? Can a
custom message box allow this? I have tried the following code but am unsure
how to put it into place.

CurrentDb.Execute "DELETE FROM tblinvoicedetails WHERE serial# = " &
Me.serial#,
dbFailOnError

Thanks and let me know if you have any questions...

Brook
 

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