Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

write to a 2nd table when formatting the first

Status
Not open for further replies.

kidhabj

Programmer
Jun 7, 2005
5
US
I HAVE 2 TABLES...i need the second table to contain the same data as the first so when i delete information from the first i dont delete it from the second.

Is there a vb code to do that

 
Hi,

Nice succinct solution Will ;-).

Kid, it doesn't sound like you really want the 2nd table to be the same as the first. If you duplicate the first table into the 2nd, then delete a record from the 1st table - ok - you have the original table.
But, what happens when you delete a record from the 1st table again - next day?
You copy the 1st table to the 2nd, then delete the record from the first - right? You've lost the change that you made on the previous day.

Firstly, copy your first table to a new table name (call it tblDeletedRecords) without any data.

Then, before you delete the record from table1, use an APPEND query (as Will has suggested) to append this record to table 2.
Delete the record from table1.

Regards,

Darrylle




Never argue with an idiot, he'll bring you down to his level - then beat you with experience. darrylles@yahoo.co.uk
 
You know, this post is awfully similar to the other post at Help also posted on June 7th, 2005.

The objective of the request is so deleted records can be recovered if required.

PHV, the top contributor to this forum ended his comment with ... "Why a so meaningless subject ?"

What you want to do can be done, but are you sure it is requried?

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top