[AccessD] Toolbar staying put on one line

John Bartow john at winhaven.net
Fri Jun 2 09:51:31 CDT 2006


Thanks Charlotte, its a good starting point to resolving an irritation :o) 

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Charlotte Foust
Sent: Tuesday, May 30, 2006 10:33 AM
To: Access Developers discussion and problem solving
Subject: Re: [AccessD] Toolbar staying put on one line

Not much to post since I could never convince the powers that be to let me
use a class.  We typically create a series of menu bars for things like the
main screen and of course for reports.  We distribute runtimes and can't use
the built in form property to show a toolbar, so it has to be done in code.


We use these as required from a standard module:

Function ToolBarsOff() As Boolean
'   Turns Built In Tool Bars Off
    On Error Resume Next
    Application.SetOption "Built-In ToolBars Available", False
    ToolBarsOff = True
End Function


Sub ToolBarsOn()
'   Turns the Built In Tool Bars On
    On Error Resume Next
    Application.SetOption "Built-In ToolBars Available", True End Sub


Each object that requires a menu/toolbar has code in its Open or Activate
event:

    	DoCmd.ShowToolbar "RIMBaseMain", acToolbarYes
    	DoCmd.ShowToolbar "RIMBaseMenu", acToolbarNo

And we reverse that in the close event:

	DoCmd.ShowToolbar "RIMBaseMain", acToolbarNo
	DoCmd.ShowToolbar "RIMBaseMenu", acToolbarNo

If it happens to be the main menu form that is being closed (which also
closed the application), we call ToolBarsOn to make sure we leave a full
version of Access in the condition we found it.



Charlotte


-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of John Bartow
Sent: Saturday, May 27, 2006 8:41 AM
To: 'Access Developers discussion and problem solving'
Subject: Re: [AccessD] Toolbar staying put on one line

I'd appreciate anything you can post.

-----Original Message-----
From: accessd-bounces at databaseadvisors.com
[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Charlotte Foust

Actually, that's our main solution.  We have a default menubar with limited
choices and we show and hide custom menubars/toolbars depending on the form
or report being displayed.  It isn't foolproof, but it's the closest we
could come. 

--
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




More information about the AccessD mailing list