Dan Waters
df.waters at comcast.net
Mon Jun 6 14:25:37 CDT 2011
Hi Tony,
DoCmd.ShowToolbar is the correct command. However, you may need to have the
toolbar displayed for reports. If so, this is what I do:
'-- Turn ribbon on/off as needed
Public Sub DisplayRibbon(blnDisplayRibbon As Boolean)
'-- Purpose: The ribbon is only displayed in Access 2007 reports and
up.
If SysCmd(acSysCmdAccessVer) >= 12 Then
If blnDisplayRibbon = True Or
DBEngine(0)(0).Properties("AllowSpecialKeys") = True Then
DoCmd.ShowToolbar "Ribbon", acToolbarYes
Else
DoCmd.ShowToolbar "Ribbon", acToolbarNo
End If
End If
End Sub
'-- Turn ribbons off when the app opens
Private Sub MainForm_Open()
Call DisplayRibbon(True)
End Sub
'-- Turn the ribbons on when opening a report
Private Sub Report_Open(Cancel As Integer)
Call DisplayRibbon(True)
End Sub
'-- Turn the ribbons off when closing a report
Private Sub Report_Close()
Call DisplayRibbon(False)
End Sub
HTH!
Dan
-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Tony Septav
Sent: Monday, June 06, 2011 2:11 PM
To: Access Developers discussion and problem solving
Subject: [AccessD] Ribbons
Hey All
Well I just ran into the 12th hour syndrome. Did my installation package for
an Access2003 application and found out the client users are not allowed to
access their C: drive. They have Access2007 on their server.
I have tried to search the database advisors archives (some days I can some
days I can't) today I can't. I would like to turn off the
Access2007 ribbon. My question is would this work on opening the MDE??
DoCmd.ShowToolBars "Ribbon",acToolBarNo
Thanks Kindly
--
AccessD mailing list
AccessD at databaseadvisors.com
http://databaseadvisors.com/mailman/listinfo/accessd
Website: http://www.databaseadvisors.com