[AccessD] Ribbons

newsgrps newsgrps at dalyn.co.nz
Mon Jun 6 16:02:41 CDT 2011


Here is something I have found if your application is developed on an 
earlier version of Access than 2007 but will be run only on later versions.

I have an application developed in AccessXP which is run in 2007 and 
2010 (and not on earlier versions).  All screens and reports have 
custom menus and they work no problem without seeing the Access Ribbon at all.

When the application is ready for production I open it in Access 2007 
and go into the Access Options .. Current Database section. There I 
clear all boxes except Display Status Bar.  I ensure that a Menu Bar 
is selected - this is used when the program opens.  Once this is done 
I save the database and create my ade.  I haven't tried it with an 
mde but the source of the tip indicated that it would.

The reason I don't develop it direct in 2007 is that I don't have a 
copy available at the moment.  It is only when it gets to the users 
machine that I can do the last part.

Regards

David Emerson
Dalyn Software Ltd
New Zealand

At 7/06/2011, Dan Waters wrote:
>Hi Tony,
>
>In my system (developed in Access 2003), I turn off ALL the built-in
>toolbars when users are logged on.  But I made a custom toolbar for reports
>so they can be closed, emailed, printed, etc.  But if I don't allow the
>ribbon for reports when using Access 2007+, the users could open a report,
>and then they'd be stuck.  So I allow the Access 2007 ribbon to open when a
>report opens, and then they've got the control they need, but they can't
>make any database changes.
>
>Also, when a report opens, I use DoCmd.Maximize to be sure that the report
>screen covers everything else.  When the report closes, I use DoCmd.Restore
>to get everything back to its previous condition.
>
>Here's something I learned by trial and error:  Don't place DoCmd.Maximize
>in the Open event for the report.  Instead, place it immediately after the
>code which opens the report like this:
>
>     DoCmd.OpenReport "rptXXX", acViewPreview
>     DoCmd.Maximize
>
>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:45 PM
>To: Access Developers discussion and problem solving
>Subject: Re: [AccessD] Ribbons
>
>Hey Dan
>Thank you
>Just wondering why I would turn on the ribbon for reports, I control what
>user can access when doing reports?
>
>Dan Waters wrote:
>
> >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




More information about the AccessD mailing list