Hello!
I have a database with two tables. I am trying to update one of the tables every time a record is added to or deleted from the other table. Right now, I am planning on using this VBA code:
Code:
Sub Form_AfterInsert()
DoCmd.RunSQL "INSERT INTO SecondTable VALUES([some value from FirstTable], [another value from FirstTable])"
End Sub
My question is how do I get the values from the first table after they are inserted/before they are deleted? I was hoping for some sort of ActiveRecord function that would have that data, but I am not finding anything like that.
Thoughts? Advice?
Thanks for the help!
Update: I guess adding an account could be tracked in the same table, but I can't keep track of the deletions there. I am looking for a way to save information out of a record that is about to be deleted. This make sense? Thanks!