Carolyn Johnson
cjlabs at att.net
Mon Mar 14 15:29:24 CDT 2011
Try adding a default menu bar (eg File - Exit). Maybe that's the key. It would have your menu bar instead of the ribbon. I have custom menu bars and toolbars, and they both show with no ribbon. Carolyn Johnson ----- Original Message ----- From: Kaup, Chester To: Access Developers discussion and problem solving Sent: Monday, March 14, 2011 3:26 PM Subject: Re: [AccessD] Access 2003 database in Access 2007 I tried your code with the following settings and still see the ribbon and no custom toolbars. I have no custom menus. Am I missing some settings? Private Sub Form_Open(Cancel As Integer) SetProperty "StartupShowDBWindow", dbBoolean, False SetProperty "AllowShortcutMenus", dbBoolean, True SetProperty "AllowFullMenus", dbBoolean, False SetProperty "AllowBuiltinToolbars", dbBoolean, False SetProperty "AllowToolbarChanges", dbBoolean, False SetProperty "AllowSpecialKeys", dbBoolean, True SetProperty "StartupShowStatusBar", dbBoolean, True SetProperty "UseAppIconForFrmRpt", dbBoolean, True SetProperty "AppTitle", dbText, "SACROC Surveillance" 'SetProperty "StartUpMenuBar", dbText, "" SetProperty "AppIcon", dbText, "C:\Documents and Settings\All Users\Documents\OilBarrel24.ico" End Sub -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Stuart McLachlan Sent: Thursday, March 10, 2011 5:47 PM To: Access Developers discussion and problem solving Subject: Re: [AccessD] Access 2003 database in Access 2007 I use a more generic Function where you pass the property type as well: SetProperty "AllowBypassKey", dbBoolean, False Public Function SetProperty(strPropName As String, _ varPropType As Variant, varPropValue As Variant) As Long On Error GoTo Err_SetProperty Dim db As DAO.Database, prp As DAO.Property Set db = CurrentDb db.Properties(strPropName) = varPropValue SetProperty = True Set db = Nothing Exit_SetProperty: Exit Function Err_SetProperty: If Err = 3270 Then 'Property not found Set prp = db.CreateProperty(strPropName, varPropType, varPropValue) db.Properties.Append prp Resume Next Else SetProperty = False MsgBox "SetProperties", Err.Number, Err.Description Resume Exit_SetProperty End If End Function On 10 Mar 2011 at 16:40, Carolyn Johnson wrote: > Public Sub ChangeAppProperty(ByVal sName As String, ByVal bValue As > Boolean) Dim prp As DAO.Property > > On Error Resume Next > > CurrentDb.Properties(sName) = bValue > If Err.Number = 3270 Then > Set prp = CurrentDb.CreateProperty(sName, dbBoolean, bValue) > CurrentDb.Properties.Append prp > End If > > End Sub > > > I have a comparable sub for properties that have text values rather > than boolean values. > > -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com