maquino
05-21-2002, 10:40 AM
How can I insert an option(can be a button) in a form to delete that record? for example, I have field to be filled in the form such as "name", "phone number", and close to them I want to give the option to delete that record from the database.
Thanks in advance
David R
05-21-2002, 01:39 PM
Consider using a "Deleted" Yes/no checkbox in your table. Then only show the records where [Deleted] = 0 on your form.
Your button should simply change the value from -1 (Yes) to 0 (No). Then you can change it if they screw up or you need the record later on after all.
Otherwise, a Delete Query will do what you suggest, but I STRONGLY recommend copying the record to a tableDeleted or something similar first, and putting a confirmation message on your button regardless.