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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Store deleted files in a different table

Status
Not open for further replies.

1starr

Programmer
Feb 19, 2002
34
US
I am attempting to create a delete button and program the button to send the items being deleted to a table, which keeps tracks of the date, time, and possibly the person deleting the info. Any assistant you could provide would be greatly appreciated.

Thanks.
 
I am attempting to create a delete button and program the button to send the items being deleted to a table, which keeps tracks of the date, time, and possibly the person deleting the info. Any assistant you could provide would be greatly appreciated

Hi

Define your 'other' table with same structure as your main table, but with three extra columns for DateDelete (type date/time) with default = Now(), UserId (type Text), PK as type autonumber (just to give each row a unique id)

In your delete button insert the record to be deleted into you 'log' table, you can do this with .AddNew, .Update or by building an "INSERT..." SQL string,

Then delete the row from the main table

If you have a secured database where users have to log in, you can get the user id from CurrentUSer(), if not pots back I have a routine to get the network user login id

Hope this sets you on track. Regards

Ken Reay
Freelance Solutions Developer
Boldon Information Systems Ltd
UK
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top