Delete record...

endri81

Registered User.
Local time
Yesterday, 17:57
Joined
Jul 5, 2010
Messages
121
Hi
I need a button to delete selected records and not all of them.Is this possible?

Regards
 
Sure its possible, but how do you plan to select the records for deletion?

Listbox, checkboxes etc

JR
 
Yes, it's possible. I suggest to add a YES/NO field in the table, and in the form.
Alos, make a Delete query, and a command button in the form.

Look at "DemoDeleteRecordsA2002.mdb" (attachment, zip).
Look at table, query, form. Open the Form and try.
Before take a copy of your table.
 

Attachments

A method many developers use is to have a YES/NO field, as MStef has suggested, but rather than actually deleting the record, simply use this field to mark it as 'inactive.'

You leave the record in the table, but use a query to only display records not marked as inactive. After 'deleting' a record you can merely requery the form.

This has the advantage of 'archiving' the record. If need be, you can use another, similar query to only display 'inactive' records, which is to say those records with the YES/NO field ticked.

Linq ;0)>
 
Thank you for the advice.
But still not very clear.I have a tabbed form and moving through tabs user enters the record data.Now if we use navigation buttons and see a record is it possible to delete this record?
 
Thank you for the advice.
But still not very clear.I have a tabbed form and moving through tabs user enters the record data.Now if we use navigation buttons and see a record is it possible to delete this record?

If you want to delete the current record you are on, you can simply have a command button on the same form and use

DoCmd.RunCommand acCmdDeleteRecord
 

Users who are viewing this thread

Back
Top Bottom