I 've added this code in a project.
I have Access 2003. Works fine on my machine.
My client has Access 2007.
Does it work in Access 2007?
Code:
Dim i As Integer
For i = 1 To CommandBars.Count
CommandBars(i).Enabled = False
Next i
CommandBars("MyMenuBar").Enabled = True
ChangeProperty "AppTitle", DB_TEXT, "Παραγγελίες"
ChangeProperty "AllowFullMenus", DB_BOOLEAN, False 'Access Full Menus.
ChangeProperty "AllowSpecialKeys", DB_BOOLEAN, False 'F11, ALT F11, etc.
ChangeProperty "AllowBypassKey", DB_BOOLEAN, False 'Shift Key Override on loading.
ChangeProperty "AllowShortcutMenus", DB_BOOLEAN, False 'Access Shortcut Menus. May be too severe.
ChangeProperty "AllowBreakIntoCode", DB_BOOLEAN, False 'Code access.
ChangeProperty "AllowBypassKey", DB_BOOLEAN, False
ChangeProperty "StartUpShowDBWindow", DB_BOOLEAN, False
Application.CommandBars.DisableAskAQuestionDropdown = True 'Remove the "Type a question for help"
ChangeProperty "AllowToolbarChanges", DB_BOOLEAN, False 'Prevent Changes.
Function ChangeProperty(strPropName As String, varPropType As Variant, varPropValue As Variant) As Integer
Dim dbs As Object, prp As Variant
Const conPropNotFoundError = 3270
Set dbs = CurrentDb
On Error GoTo Change_Err
dbs.Properties(strPropName) = varPropValue
ChangeProperty = True
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