If Application.UserControl =True Then Application.Quit
I have used method b) in conjunction with other security measures such as disabling the shift bypass to help prevent hacking using automation.
However, no Access database can EVER be made 100% secure. A capable and determined hacker can break any Access database given sufficient time and motivation.
Nevertheless, by erecting various barriers, it is certainly possible to make the process so difficult and time consuming that it isn't normally worth attempting.
Click to download:
BlockDBOpenDirect (approx 0.5 MB - zipped)
BlockDBRemoteAccess (approx 0.5 MB - zipped)
If Application.UserControl =False Then Application.Quit