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

need data just deleted

Status
Not open for further replies.

GingerR

MIS
Apr 17, 2001
3,134
US
acc2k--keeping a log of changed, added and deleted data. all fine, except i can't figure out the deleted data:

i have a main form.
in the subform, is just a list of related 'areas'.
a user can choose one and hit DELETE key.

once they confirm delete, i want to log into my EDITS table the value they have deleted, i.e. AREA DELETED: 4335

but i cannot get the 4335. have tried BeforeDeleteConfirm, AfterDeleteConfirm and On Delete events. where can i capture this data?

thanks--
 
michael maybe i am looking a diff faq? i searched on 'audit trail', read a faq by rob potts and got the code. first, the BeforeUpdate event doesn't launch when you delete a record. other than that, if you read the faq from rob potts it says "It records all new data added to forms, who they were made by and the date and time, and what chages have been made." nothing about if you delete a record. anyhow, i have figured it out. thanks for your put.

g
 
oh, well haven't seen Mr. Potts thinggy. Mine is faq181-291, perhjaps I shouild have mentioned "transaction log' as the key word.





MichaelRed
m.red@att.net

Searching for employment in all the wrong places
 
i guess i don't see where it logs when an entire record is deleted?
 
It "shoulda" log each change to each Field whenever a record is changed in ANY maner, Ad would show all the fields which had a value in the iinitial generation of hte record. Edit 'woulda' show each field where the value has changes, while delete sould reflect each field which 'coulda' had data when the record was removed.

My only -and LAST- suggestion post in htis thread is for you to implement the code on a "dummy' form connected to a 'dummy' table/query and expiriment a bit. Perhaps you can understand the results more easily than the code.




MichaelRed
m.red@att.net

Searching for employment in all the wrong places
 
i've done it and it works, however when i DELETE a record while looking at the form, nothing logs in that i have deleted the record (which is what i was looking for). i'm not talking about deleting the data in a field; i'm talking about deleting the record. i launched the function from BEFORE UPDATE event of the FORM. just for sh*tz and giggle i put it in DELETE event. but it doesn't work. i think you'd have to write extra code like i did above, that someone puts in the DELETE event too, which logs in a DELETED RECORD. Before Update and After Update do not fire with a DELETE event. if you can pull this off with the code you supplied, and i am just totally blind, let me know.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top