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.
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
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.