If you are completely locked out, you can use another database to set these
properties. Just set the strDb to the fully qualified path name for your
applicaiton, and remove the quotes from the beginning of the lines you want
to change:
Option Compare Database
Option Explicit
Function StartupProps(bSet As Boolean)
Dim db As DAO.Database
Dim strDB As String
Dim strPrp As String
strDb = "C:\MyPath\MyFile.mdb"
Set db = OpenDatabase(strDB)
' Application.SetOption "Track Name AutoCorrect Info", bSet
' Application.SetOption "Perform Name AutoCorrect", bSet
' Application.SetOption "Log Name AutoCorrect Changes", bSet
' ChangeProperty db, "StartupForm", dbText, "Form1"
' ChangeProperty db, "StartupShowDBWindow", dbBoolean, bSet
' ChangeProperty db, "StartupShowStatusBar", dbBoolean, bSet
' ChangeProperty db, "AllowBuiltinToolbars", dbBoolean, bSet
' ChangeProperty db, "AllowBreakIntoCode", dbBoolean, bSet
' Call ChangeProperty(db, "AllowFullMenus", dbBoolean, bSet)
Call ChangeProperty(db, "AllowSpecialKeys", dbBoolean, bSet)
Call ChangeProperty(db, "AllowBypassKey", dbBoolean, bSet)
db.Close
Set db = Nothing
End Function
Function ChangeProperty(dbs As Database, strPropName As String, _
varPropType As Variant, varPropValue As Variant) As Integer
Dim prp As Property
Const conPropNotFoundError = 3270
On Error GoTo Change_Err
dbs.Properties(strPropName) = varPropValue
ChangeProperty = True
Debug.Print strPropName & " is " & varPropValue
Change_Bye:
Exit Function
Change_Err:
If Err = conPropNotFoundError Then ' Property not found.
Set prp = dbs.CreateProperty(strPropName, _
varPropType, varPropValue)
dbs.Properties.Append prp
Resume Next
Else
' Unknown error.
ChangeProperty = False
Resume Change_Bye
End If
End Function