The following closes down pretty much everything, and you can start up your own form from autoexec macro.
I run this procedure in the first form opened to disable all. On that form you can log in and then this procedure is run to enable all. After that you can close the DB and then open it with shift.
Obviously the tables in the database can still be imported in other databases. In my case this is fairly useless because the only thing users could get out of this is an encrypted password. Decryption is done in VB, and that's password protected.
I wanted a program that could startup without the need of selecting any name or inputting any password.
(It is a DB that registers sales/stock etc. of the bar of a scout group).
As far as i know it is quite secure by now anyway, except if users that can login to enable the buttons are shouting around their password. Only other possibility is that somebody cracks the Password encryption, which offcourse is possible because it is only a bunch of sting manipulations tied together to get a text that is not comparable any more to the original characters or length of the password.
Public Sub EnableProgramming(hEnable As Boolean)
Set dbCurrent = CurrentDb
dbCurrent.Properties("StartUpShowDBWindow"

= hEnable
dbCurrent.Properties("StartupShowStatusBar"

= hEnable
dbCurrent.Properties("AllowSpecialKeys"

= hEnable
dbCurrent.Properties("AllowFullMenus"

= hEnable
dbCurrent.Properties("AllowToolbarChanges"

= hEnable
dbCurrent.Properties("AllowBuiltInToolbars"

= hEnable
dbCurrent.Properties("AllowBypassKey"

= hEnable
End Sub "In three words I can sum up everything I've learned about life: it goes on."
- Robert Frost 1874-1963