Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Access 2007: Showing a personalized toolbar

Status
Not open for further replies.

Bresart

Programmer
Feb 14, 2007
314
ES
Hi, i have a DB from Access 2000. The form that loads at starting hides the predefined toolbars, but when i want to show a report i use:

DoCmd.ShowToolbar "Toolbar1", acToolbarYes


That in Access 2007 makes nothing.

Is it because the 'Ribbon' toolbar must be also shown?

Is there any way of showing only the personalized toolbar i want?

Thanks for any help given.
 
In Access 2007, your custom toolbars and menubars are available on the ribbon's "Add-Ins" tab.

To hide all ribbon tabs other than "Home" and "Add-Ins" in Access 2007, click the "Office" button, then "Access Options", then "Current Database". Under "Ribbon and Toolbar Options", remove the check mark from "Allow Full Menus".

Instead of showing your report toolbar using VBA, I suggest that you set your forms' and reports' menubars and toolbars on "Other" tab of the report's property sheet.

Regards,
Lisa
 
Thanks Lisa.

In "Access Options", then "Current Database", under "Ribbon and Toolbar Options", there's three 'Allow' checkbox options, and i only have checked 'Allow the use of integrated toolbars'. I have tried to uncheck it, but the result doesn't change.

I'm interested in a built-in toolbar for a query, so i don't have the possibility of using the property sheet for stablishing that.

It would be enought if i can block all options in the ribbon toolbar except the 'Add-Ins' tab.
 
My mistake. I was talking about an accdb, not an mdb.

Here's a link that explains how custom toolbars and menu bars that you created in earlier versions of Access behave when you open those older databases in Microsoft Office Access 2007. This topic also explains how to turn off the Ribbon so that you can use just your custom toolbars and menu bars.

Regards,
Lisa
 
Thanks Lisa.

I will see that link and i tell you.
 
Hi Lisa. This article explains how to show or hide the toolbars you want from the beginning, but even following these steps, the toolbar Ribbon can be shown in any moment in the database, and not the custom toolbars without the ribbon one.

I don't want the ribbon appears because it has fully options for modifying or adding objects in the database, but the only way i have seen for showing a custom toolbar is in the Adds-In tab of the ribbon toolbar. Also, i want to show this custom toolbar only when a query opens (not from the beginning), and hide after.

Is that possible in Access 2007?
 
I have done it by enabling the startup settings. The startup form has a code for hidding the built-in and custom toolbars, and for setting the start properties:

Private Sub Form_Load()
Application.SetOption "Move After Enter", 0
Application.SetOption "Behavior Entering Field", 0
Application.SetOption "Arrow Key Behavior", 1
Const DB_Text As Long = 10
Const DB_Boolean As Long = 1
ChangeProperty "StartupForm", DB_Text, "frmInicio"
ChangeProperty "StartupShowDBWindow", DB_Boolean, False
ChangeProperty "StartupShowStatusBar", DB_Boolean, True
ChangeProperty "AllowSpecialKeys", DB_Boolean, False
ChangeProperty "AllowBypassKey", DB_Boolean, False
End Sub


Private Sub Form_Open(Cancel As Integer)
DoCmd.ShowToolbar "Form View", acToolbarNo ' Hide Form View Menu
DoCmd.ShowToolbar "Menu Bar", acToolbarNo ' Hide default Menu Bar
DoCmd.ShowToolbar "Print Preview", acToolbarNo
DoCmd.ShowToolbar "Window1", acToolbarNo
DoCmd.ShowToolbar "Window2", acToolbarNo

If GetVersion() = "12.0" Then
DoCmd.ShowToolbar "Ribbon", acToolbarNo
End If
End Sub



By opening this form on startup, when i show the Ribbon toolbar the only menu item that appears is Start, which is closely what i was trying.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top