Lock Project for Viewing via Code?

A2k (9.0.3821) SR-1

My security concerns are to keep non-techinical users out of the database window and others out of code modules.

I have a hidden button (with hard coded mode and password) on switchboard that allows me to enable or disable AllowBypassKey property for production or development mode purposes.

With code, how do I also automatically set VB Code