Carolyn Johnson
cjlabs at att.net
Wed Mar 23 17:19:34 CDT 2011
That looks like what I use.
Do all your forms have your custom menu bar assigned to them?
Carolyn Johnson
----- Original Message -----
From: David Emerson
To: Access Developers discussion and problem solving
Sent: Wednesday, March 23, 2011 5:10 PM
Subject: Re: [AccessD] Access 2003 database in Access 2007
I call the code below from the Open event of the first form that
opens when the app starts. I have just tested it on Access 2007 and
am still seeing the ribbon. My custom menu is showing in the Add In
tab. Am I doing something wrong?
Public Sub basSetProperties()
basSetProperty "StartupShowDBWindow", dbBoolean, False
basSetProperty "AllowShortcutMenus", dbBoolean, True
basSetProperty "AllowFullMenus", dbBoolean, False
basSetProperty "AllowBuiltinToolbars", dbBoolean, False
basSetProperty "AllowToolbarChanges", dbBoolean, False
basSetProperty "AllowSpecialKeys", dbBoolean, True
basSetProperty "StartupShowStatusBar", dbBoolean, True
basSetProperty "UseAppIconForFrmRpt", dbBoolean, True
basSetProperty "AppTitle", dbText, "Ribbon Test"
basSetProperty "StartUpMenuBar", dbText, "MenuBarMenus"
' basSetProperty "AppIcon", dbText, "C:Prog\LTD.ico"
End Sub
Public Function basSetProperty(strPropName As String, varPropType As
Variant, varPropValue As Variant) As Long
On Error GoTo Err_basSetProperty
Dim db As DAO.Database, prp As DAO.Property
Set db = CurrentDb
db.Properties(strPropName) = varPropValue
basSetProperty = True
Set db = Nothing
Exit_basSetProperty:
Exit Function
Err_basSetProperty:
If Err = 3270 Then 'Property not found
Set prp = db.CreateProperty(strPropName, varPropType, varPropValue)
db.Properties.Append prp
Resume Next
Else
basSetProperty = False
MsgBox "SetProperties", Err.Number, Err.Description
Resume Exit_basSetProperty
End If
End Function
Regards
David Emerson
Dalyn Software Ltd
Wellington, New Zealand
At 11/03/2011, Carolyn Johnson wrote:
>Well, it seems to be working on 2010 now. Maybe I'm thinking of
>times when I bypassed the startup form and then had to deal with the
>ribbon. But I thought it was enough of a problem to put on my To Do
>list. Guess I'll cross it off!
>
>Carolyn Johnson
--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com