Solved VBA code for emailing an individual when a record is deleted from a table(s) (1 Viewer)

Local time
Today, 06:20
Joined
Jun 3, 2022
Messages
38
Hi,

Is there a possible code to notify the Access Database Admin through outlook email once a deletion occurs from a particular table or tables?

For example, there are ten records in such a table. The user deletes one because it is unnecessary, but the database administrator wants to be notified about the deletion and what was deleted from the table. If anyone has an example to showcase or code, that'd be beneficial.

Thanks!
 
Last edited:

June7

AWF VIP
Local time
Today, 03:20
Joined
Mar 9, 2014
Messages
5,474
Did you search for code samples? Likely won't find something specific but automating email is a common topic. Examples should be adaptable. Real trick is figuring out what event to put code into. Possibly use form BeforeDelete event.

Deleting records should be a rare occurrence. Do you really want to allow this? Better may be to just 'flag' a record as "Inactive". Can still send email but recovering record is simply matter of changing field value.
 

Users who are viewing this thread

Top Bottom