Adding a toolbar to a form

randle

Registered User.
Local time
Today, 22:23
Joined
Jun 16, 2010
Messages
57
Hi

Can someone tell me how I can add a toolbar ie. Format options, to a specific form in Access 2010. Is this actually possible?
 
The user interface (and the user experience :) ) changed from Access 2007 and above. Toolbars (and Menubars) have become an obsolete feature in those versions. Access 2010 uses ribbons in place of toolbars so if you want custom menus you will need to customise the ribbon.

However, if you create toolbars in older versions of Access you can still use them in Access 2007+
 
Many thanks for the reply. I'm aware that the ribbon replaces toolbars but was hoping it was still possible to add a toobar of some sort to a modal form that the ribbon can't be used on.

Basically I want to add the format text options to the form rather than using the context menu that appears when highlighting text. I know this is the same but doesn't always appear on queue.
 
Even if you add toolbars they will remain on the ribbon ;)

Create some buttons in the Header section of the Pop-up form and get it to do what you want.
 
Good idea. Care to tell me the code for making highlighted text in any field on a form bold!? I've tried "Me.Selection.Font.Bold = TRUE" and variations of this but not joy!!
 
You will need to loop through the Controls collection of the form and change the FontBold and FontWeight properties.
 
Sorry for being a little dumb but how do I loop through the controls collection of the form? Am I creating a macro for this button and setting the command from this?
 
You're going to use code. Here's some aircode:
Code:
dim ctl as control
 
for each ctl in Me.Detail.Controls
    select case ctl.controltype
        case actextbox
            ctl.fontbold = true
        case else
            ' do nothing
    end select
next
So what you do is manually set the Font Weight property of all the textboxes to Bold and set the Font Bold property to No. When the code runs it will simply switch the bold property back on.
 
Thanks for this. Think I'm going to leave this seeing as I'm after the full suite of formatting buttons which seems more hassle that it's worth when I can access these from the context menu that appears when highlighting text. Thanks for your help though.
 

Users who are viewing this thread

Back
Top Bottom