Public Schedule Face-to-Face & Online Instructor-Led Training - View dates & book

deleting but saving db

Forum home » Delegate support and help forum » Microsoft Access Training and help » Deleting but saving DB entries

Deleting but saving DB entries

ResolvedVersion 2010

Stuart has attended:
Access Intermediate course
Access Advanced course
Access VBA course

Deleting but saving DB entries

I have 2 tables which link to 2 forms. One of the forms has a delete button which deletes permanently from both tables.

I'd like it to not just delete but save the info from both tables in another table (deleted clients) for future reference.

How can I achieve this?

RE: Deleting but saving DB entries

Hi Stuart

Before the records are deleted you could have your button run an append query that copies the record to the deleted clients table. If the field structures of the tables are the same then that would work with a single deleted clients table.

To identify which record is to be appended you could have a check box field on in the table and on the form. This could be set to True by the macro using the Setvalue command.

Please let me know a little more about your table structures and whether your button runs a macro or a vba procedure.

Regards

Doug Dunn
Best STL

RE: Deleting but saving DB entries

Hi Doug,

The tables are fairly straight forward tables (used to be one but I split it). I'm not sure how I would show you?

The delete button is an embedded macro.

Cheers,

Stuart

RE: Deleting but saving DB entries

Hi Stuart.

With the tables the same structure you should be able to append the records as I suggested. If you want to send an example email the zipped file to doug@stl-training.co.uk

Doug
Best STL

Fri 4 Oct 2013: Automatically marked as resolved.

Access tip:

Deleting duplicate records from a table

You cannot delete records tables where there duplicate records. A way around this is to create a new table which wont hold the duplicates. and then deleting the old table.

1. Use a make-table query based on this table only. IMPORTANT - Ensure that you include all of the fields from your original table or you may loose data.

2. Open the query's property sheet by using VIEW, QUERY, PROPERTIES, and set the Unique Values property to Yes

3. Because you have selected the Unique Values to Yes when you run the query, Access creates a new table without duplicate records. You can now delete the old table and rename the new one.

View all Access hints and tips

Connect with us:

0207 987 3777

Call for assistance

Request Callback

We will call you back

Server loaded in 0.09 secs.