Position of 2 Toolbars

KeithWilliams

Registered User.
Local time
Today, 14:45
Joined
Feb 9, 2004
Messages
137
Hi,

I have an application toolbar, and certain of my forms also have a common Form toolbar defined. I positioned the form toolbar so that it was docked to the right of the application toolbar. At some point the form toolbar decided to position itself BELOW and to the right of the application toolbar, pushing the form down out of position and hence causing the application to have to display a scroll bar. After an hour or so of playing with the toolbar and form, I managed to get the form toolbar to open on the same line as the application toolbar, repeatably. Then a few days later the same thing happened, and I went through the same process to try to put it right. Now its happened again and I can't for the life of me get it back up on the same line again. I've no idea what I did to cause the problem to appear in the first place, and I've no idea what I did to fix it the last 2 times - I just played with the toolbar and form, hit save numerous times, and eventually Access decided to play ball.

So I really need some advice on how to force the form toolbar to get in the right position and stay there. I've tried the docking-related properties of the toolbar, but they don't seem to have any effect.

Many thanks,
Keith.
 
Been there, done that. ;) Try these options I picked up from the help of JeffK...

'*requires a reference to MS Office x.0 library
This one should move the toolbar to the right and verticle...
CommandBars("ToolBarName").Position = msoBarRight

This one keeps the tool bar to the far left of the screen...
Commandbars("ToolBarName").Left = 0

Check the help files for more help and options with the CommandBars property.

HTH
 
Hi,

Thanks for pointing me in the right direction. It wasn't easy, but in the end I got the following code to work (fingers crossed - its worked so far!)

CommandBars("ToolBarViewDetails").Left = 1000
CommandBars("Switchboard").Left = 0
CommandBars("ToolBarViewDetails").Top = 0
CommandBars("Switchboard").Top = 0
CommandBars("ToolBarViewDetails").Left = 1

This puts ToolbarViewDetails on the same row as Switchboard, but to the right of it, which is what I wanted.

I imagine this effectively gets the 2 toolbars to "dance around each other", ending up in the desired relation to each other.

Access certainly has some oddities!

Thanks,
Keith.
 

Users who are viewing this thread

Back
Top Bottom