sorry, haven't done it in a while. The property has to be added to the
access database once and then it can be turned on & off programmatically.
Here's and example of how to add the property and some others that you may
find useful for turning security on & off.
Dim prp As DAO.Property
Set prp = CodeDb.CreateProperty("StartUpShowDBWindow", 1, 0)
CodeDb.Properties.Append prp
Set prp = CodeDb.CreateProperty("AllowBreakIntoCode", 1, 0)
CodeDb.Properties.Append prp
Set prp = CodeDb.CreateProperty("AllowSpecialKeys", 1, 0)
CodeDb.Properties.Append prp
Set prp = CodeDb.CreateProperty("AllowToolbarChanges", 1, 0)
CodeDb.Properties.Append prp
Set prp = CodeDb.CreateProperty("AllowFullMenus", 1, 0)
CodeDb.Properties.Append prp
Set prp = CodeDb.CreateProperty("AllowBuiltInToolbars", 1, 0)
CodeDb.Properties.Append prp
Set prp = CodeDb.CreateProperty("AllowByPassKey", 1, 0)
CodeDb.Properties.Append prp