[AccessD] Count Current Record (Access 2007)

Stuart McLachlan stuart at lexacorp.com.pg
Fri Mar 27 00:24:23 CDT 2009


I posted this when we were discussing hiding the Ribbon Bar in eartly December 08.
It's a real kludge (Sendkeys!!!!) but it works.

<quote>
My Height was slightly different to those in the link, probably because of
different screen resolutions, fonts etc but it looks like it will always
be  above/below 100 so this should work anywhere. It certainly works for
me:  

Function RibbonMinimized() As Boolean
RibbonMinimized = Application.CommandBars("Ribbon").Height < 100
End Function

The following four functions give you full control over the Ribbon :-)

Function HideRibbon()
       DoCmd.ShowToolbar "Ribbon", acToolbarNo
End Function

Function ShowRibbon()
       DoCmd.ShowToolbar "Ribbon", acToolbarYes
End Function

Function MinimizeRibbon()
    If Not RibbonMinimized Then SendKeys "^{F1}"
    End If
End Function

Function MaximizeRibbon()
    If RibbonMinimized Then SendKeys "^{F1}"
    End If
End Function
</quote>

On 27 Mar 2009 at 15:05, Darryl Collins wrote:

> also found you can hide the ribbon using
> 
> docmd.ShowToolbar "Ribbon",acToolbarNo
> 
> Seems to work well for those who are interested.




More information about the AccessD mailing list