how to create your own toolbar and hide menu

icemonster

Registered User.
Local time
Yesterday, 20:17
Joined
Jan 30, 2010
Messages
502
can anyone help me with this? i mean i saw how to hide the toolbar, but how do i ensure myself that i can view it again as i wish?
 
Do you care showing the code of how you hide the toolbar? :)
 
In A2007 ...

To hide the ribbon ...
DoCmd.ShowToolbar "Ribbon", acToolbarNo

To show the ribbon ...
DoCmd.ShowToolbar "Ribbon", acToolbarYes

In A97 through A2003 ...

To hide the menu bar ...
DoCmd.ShowToolbar "Menu Bar", acToolbarNo

To show the menu bar ...
DoCmd.ShowToolbar "Menu Bar", acToolbarYes

When I have environments of both A2003 and A2007, I use something like the following:

Code:
Dim strMenu As String
If Val(Access.Version) >= 12 Then
    strMenu = "Ribbon"
Else
    strMenu = "Menu Bar"
End If
DoCmd.ShowToolbar strMenu, acToolbarNo

In addition, you can manipulate what Access considers the "main menu" with ...

Application.MenuBar = "Name of Some Menu Bar you have created"

But I beleive you need to restart Access for that setting to take effect. Setting the menu bar programattically has the same effect as setting it through the Access options.
 
In VBA add the line to HIDE the Office Button and Ribbon ...

DoCmd.ShowToolbar "Ribbon", acToolbarNo

Use ...

DoCmd.ShowToolbar "Ribbon", acToolbarYes

to turn them back on.

and i also saw one here in the samples i think. but he explicity said that when i do it, i better be sure i have a way to unhide it, and well honestly, i dont know how :D
 
lols :D yeah. i know that, but how exactly? am not very bright with access security. :D
 
let's see.

i can read them, but can't create one on my own :)
 
Great!!!!!!

So if you named a button cmdSetToolbar and you saw this code:

Code:
Private Sub cmdSetToolbar(setVisible as Boolean)

      DoCmd.ShowToolbar "Ribbon", IIF(setVisible = True, acToolbarYes, acToolbarNo)

End Sub
What does the whole code mean to you? Explain :)
 
im sure, you turned it off.

but the thing is my question is, if i turn it off, all of it, how do i simply turn it on? for programmer purposes? (i need to read my access for dummies 2007) hehe
 
Have you looked in the Properties of Access? Help files is a good one. Google comes in very handy too :)
 
i got it wrong! :D lols. my bad. yeah. am gonna have to leave this part last, im just trying to add more stuff to the database, one last thing though. how do i add color to a font?

i mean i have this code : =DateAdd("d",60,[Hold Date])

how do i make the font change when its past the 60 days?
i looked at google, but it was all about vba, cant this be done through expression?
 
Could this be a coursework/project you were given?

Look up Conditional Formatting. It's under one of the tabs.
 
i see. ok. alright am gonna get to work on this now. :D thanks again :D

sayonara. :D
 
thanks :) i'll just pm if i cant. last parting gift please.

how do i format it to see 60 days from field a? hehe.
 

Users who are viewing this thread

Back
Top Bottom