473,721 Members | 2,262 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Does anyone understand toolbars?

So, I tried to copy a toolbar. I have a custom menu bar for a form. Tried to
copy it so that I could modify the copy and use it with another form. With
no direct way to copy it, I made a copy of the MDB, renamed the toolbar, and
then imported it back into the original MDB as a copy of the original (see
"Copying a custom menu bar" thread here). Everything seemed fine until I
tried to modify the copy. When I added or removed items from the menu bar,
the original was modified as well! They were one toolbar with two instances
in the db.

So I'm back to where I started. Anyone know of a way to make a copy of a
toolbar so that I can modify it and use a slightly different version with
another form?
Nov 10 '07 #1
15 1926
Neil wrote:
So, I tried to copy a toolbar. I have a custom menu bar for a form.
Tried to copy it so that I could modify the copy and use it with
another form. With no direct way to copy it, I made a copy of the
MDB, renamed the toolbar, and then imported it back into the original
MDB as a copy of the original (see "Copying a custom menu bar" thread
here). Everything seemed fine until I tried to modify the copy. When
I added or removed items from the menu bar, the original was modified
as well! They were one toolbar with two instances in the db.

So I'm back to where I started. Anyone know of a way to make a copy
of a toolbar so that I can modify it and use a slightly different
version with another form?
I have seen that exact behavior. I just gave up on copying command bars and
just build each one separately. I have not seen the behavior copying an item on
a command bar to the same command bar and then changing something about the
copy, but when copying across command bars it definitely does what you describe
(although not 100% of the time).

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com
Nov 10 '07 #2
Interesting was that I could change the *name* of the top-level item in the
command bar copy without the name changing in the original; but if I added
or removed items under the top-level, it was reflected on both command bars.

I thought I was going to be real clever and try something else. Since it's
the last two top-level items that I need to modify, I went into the command
bar copy, created two new top-level items, and then ctrl-dragged the items
from the originals to the copies of the top-level items. This way, I didn't
delete items within the menu, but just created two new menus on the bar. The
two new menus didn't appear in the original. I then deleted the two menus
that I had copied from the menu bar, and I thought I was home-free: the
original had the two menus, and the copy had two brand new menus. Only one
problem: the original menu bar with the two menus I had copied had no items
under them! Sigh.

So I give up too. Good to know I'm not just missing something here.

Thanks,

Neil
"Rick Brandt" <ri*********@ho tmail.comwrote in message
news:ZC******** **********@news svr11.news.prod igy.net...
Neil wrote:
>So, I tried to copy a toolbar. I have a custom menu bar for a form.
Tried to copy it so that I could modify the copy and use it with
another form. With no direct way to copy it, I made a copy of the
MDB, renamed the toolbar, and then imported it back into the original
MDB as a copy of the original (see "Copying a custom menu bar" thread
here). Everything seemed fine until I tried to modify the copy. When
I added or removed items from the menu bar, the original was modified
as well! They were one toolbar with two instances in the db.

So I'm back to where I started. Anyone know of a way to make a copy
of a toolbar so that I can modify it and use a slightly different
version with another form?

I have seen that exact behavior. I just gave up on copying command bars
and just build each one separately. I have not seen the behavior copying
an item on a command bar to the same command bar and then changing
something about the copy, but when copying across command bars it
definitely does what you describe (although not 100% of the time).

--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com

Nov 10 '07 #3
Can you not make a copy of the database. Delete all the unused objects in
the copy and use that as a basis for your new database? You should be able
to rename and alter the copy in that manner. Doing whatever you wish to the
"new" toolbar, then import the objects from the old database, including the
old toolbar.
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com

"Neil" <no****@nospam. netwrote in message
news:fr******** *********@newss vr25.news.prodi gy.net...
So, I tried to copy a toolbar. I have a custom menu bar for a form. Tried
to copy it so that I could modify the copy and use it with another form.
With no direct way to copy it, I made a copy of the MDB, renamed the
toolbar, and then imported it back into the original MDB as a copy of the
original (see "Copying a custom menu bar" thread here). Everything seemed
fine until I tried to modify the copy. When I added or removed items from
the menu bar, the original was modified as well! They were one toolbar
with two instances in the db.

So I'm back to where I started. Anyone know of a way to make a copy of a
toolbar so that I can modify it and use a slightly different version with
another form?

Nov 10 '07 #4
On Nov 10, 7:25 am, "Neil" <nos...@nospam. netwrote:
So, I tried to copy a toolbar. I have a custom menu bar for a form. Tried to
copy it so that I could modify the copy and use it with another form. With
no direct way to copy it, I made a copy of the MDB, renamed the toolbar, and
then imported it back into the original MDB as a copy of the original (see
"Copying a custom menu bar" thread here). Everything seemed fine until I
tried to modify the copy. When I added or removed items from the menu bar,
the original was modified as well! They were one toolbar with two instances
in the db.

So I'm back to where I started. Anyone know of a way to make a copy of a
toolbar so that I can modify it and use a slightly different version with
another form?
A Hack:

I create a command bar "Employee Attendance Entries".
I store a copy in CommandBarsHold er.mdb
To create a copy I run a hack:

Public Sub AirCodeInHacker sVille()
With Application
.CommandBars("E mployee Attendance Entries").Name = "Whatever"
With WizHook
.Key = 51488399
.WizCopyCmdbars "CommandBarsHol der.mdb"
End With
.CommandBars("E mployee Attendance Entries").Name = "Employee
Attendance Entries" & Format(Now(), "yyyymmddhhnnss ")
.CommandBars("W hatever").Name = "Employee Attendance Entries"
End With
End Sub

Now I have the orignal plus a copy named Employee Attendance Entries
plus a date-time string.
Will changes in one result in changes to another? I don't know but I
doubt it.
Is the code polished? Nope! Clearly it needs a bunch of error-handling
thing-mes.

Is this any use to anyone? I doubt it, but, of course, every tiny
thing we learn may come in handy at some crucial time down the road
and it's fun messing!
The home db in this case is 2007; the bar holder is 1997. That's quite
a jump.

Nov 10 '07 #5
No, that's exactly what I did -- except I didn't delete unused objects. I
simply made a copy of the MDB, renamed the toolbar, and then imported all
toolbars. Since the other toolbars had the same name as their original
counterparts, they didn't import. The only thing that imported was the one
that I renamed in the copy.

So, I thought everything was fine, as I had two toolbars with two different
names -- one for one form, and one for another form. The problem arose when
I started modifying the copy. When I modified the copy that I had imported,
the original was modified as well.

Two toolbars in the database, two different names; yet somehow Access sees
them as the same toolbar.
"Arvin Meyer [MVP]" <a@m.comwrote in message
news:uF******** ******@TK2MSFTN GP05.phx.gbl...
Can you not make a copy of the database. Delete all the unused objects in
the copy and use that as a basis for your new database? You should be able
to rename and alter the copy in that manner. Doing whatever you wish to
the "new" toolbar, then import the objects from the old database,
including the old toolbar.
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com

"Neil" <no****@nospam. netwrote in message
news:fr******** *********@newss vr25.news.prodi gy.net...
>So, I tried to copy a toolbar. I have a custom menu bar for a form. Tried
to copy it so that I could modify the copy and use it with another form.
With no direct way to copy it, I made a copy of the MDB, renamed the
toolbar, and then imported it back into the original MDB as a copy of the
original (see "Copying a custom menu bar" thread here). Everything seemed
fine until I tried to modify the copy. When I added or removed items from
the menu bar, the original was modified as well! They were one toolbar
with two instances in the db.

So I'm back to where I started. Anyone know of a way to make a copy of a
toolbar so that I can modify it and use a slightly different version with
another form?


Nov 10 '07 #6
On Sat, 10 Nov 2007 22:20:24 GMT, "Neil" <no****@nospam. netwrote:

Rather than making a copy of your database I would try creating a new blank
database and import only the toolbars from your database and no other objects.
So you now have a database containing nothing but toolbars. Delete the toolbars
you don't want, rename your target TB. Edit the TB as required and then import
it back to your database.

This might break whatever link is syncing the toolbars in the background. Don't
know if it will work but it would be worth a try.
>No, that's exactly what I did -- except I didn't delete unused objects. I
simply made a copy of the MDB, renamed the toolbar, and then imported all
toolbars. Since the other toolbars had the same name as their original
counterparts , they didn't import. The only thing that imported was the one
that I renamed in the copy.

So, I thought everything was fine, as I had two toolbars with two different
names -- one for one form, and one for another form. The problem arose when
I started modifying the copy. When I modified the copy that I had imported,
the original was modified as well.

Two toolbars in the database, two different names; yet somehow Access sees
them as the same toolbar.
"Arvin Meyer [MVP]" <a@m.comwrote in message
news:uF******* *******@TK2MSFT NGP05.phx.gbl.. .
>Can you not make a copy of the database. Delete all the unused objects in
the copy and use that as a basis for your new database? You should be able
to rename and alter the copy in that manner. Doing whatever you wish to
the "new" toolbar, then import the objects from the old database,
including the old toolbar.
--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com

"Neil" <no****@nospam. netwrote in message
news:fr******* **********@news svr25.news.prod igy.net...
>>So, I tried to copy a toolbar. I have a custom menu bar for a form. Tried
to copy it so that I could modify the copy and use it with another form.
With no direct way to copy it, I made a copy of the MDB, renamed the
toolbar, and then imported it back into the original MDB as a copy of the
original (see "Copying a custom menu bar" thread here). Everything seemed
fine until I tried to modify the copy. When I added or removed items from
the menu bar, the original was modified as well! They were one toolbar
with two instances in the db.

So I'm back to where I started. Anyone know of a way to make a copy of a
toolbar so that I can modify it and use a slightly different version with
another form?

Wayne Gillespie
Gosford NSW Australia
Nov 11 '07 #7
Given the number of questions about toolbars that we see here, there clearly
are quite a number of people who do NOT understand them. But you see to have
found a couple of "anyones" who certainly DO understand Toolbars.

Larry Linson
Nov 11 '07 #8
Indeed.

"Larry Linson" <bo*****@localh ost.notwrote in message
news:4WKZi.204$ RR1.146@trnddc0 2...
Given the number of questions about toolbars that we see here, there
clearly are quite a number of people who do NOT understand them. But you
see to have found a couple of "anyones" who certainly DO understand
Toolbars.

Larry Linson


Nov 12 '07 #9
Hi, Lyle. Thanks for this!

I created these objects below with the same names you used in your code, and
I ran your code. On the line:

..WizCopyCmdbar s "CommandBarsHol der.mdb"

I get the error: "Object doesn't support this property or method."

Any ideas?

Thanks!

Neil
"lyle" <ly************ @gmail.comwrote in message
news:11******** **************@ 22g2000hsm.goog legroups.com...
On Nov 10, 7:25 am, "Neil" <nos...@nospam. netwrote:
>So, I tried to copy a toolbar. I have a custom menu bar for a form. Tried
to
copy it so that I could modify the copy and use it with another form.
With
no direct way to copy it, I made a copy of the MDB, renamed the toolbar,
and
then imported it back into the original MDB as a copy of the original
(see
"Copying a custom menu bar" thread here). Everything seemed fine until I
tried to modify the copy. When I added or removed items from the menu
bar,
the original was modified as well! They were one toolbar with two
instances
in the db.

So I'm back to where I started. Anyone know of a way to make a copy of a
toolbar so that I can modify it and use a slightly different version with
another form?

A Hack:

I create a command bar "Employee Attendance Entries".
I store a copy in CommandBarsHold er.mdb
To create a copy I run a hack:

Public Sub AirCodeInHacker sVille()
With Application
.CommandBars("E mployee Attendance Entries").Name = "Whatever"
With WizHook
.Key = 51488399
.WizCopyCmdbars "CommandBarsHol der.mdb"
End With
.CommandBars("E mployee Attendance Entries").Name = "Employee
Attendance Entries" & Format(Now(), "yyyymmddhhnnss ")
.CommandBars("W hatever").Name = "Employee Attendance Entries"
End With
End Sub

Now I have the orignal plus a copy named Employee Attendance Entries
plus a date-time string.
Will changes in one result in changes to another? I don't know but I
doubt it.
Is the code polished? Nope! Clearly it needs a bunch of error-handling
thing-mes.

Is this any use to anyone? I doubt it, but, of course, every tiny
thing we learn may come in handy at some crucial time down the road
and it's fun messing!
The home db in this case is 2007; the bar holder is 1997. That's quite
a jump.

Nov 12 '07 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
6436
by: Steve Dorsey | last post by:
Hello I'm creating a web page that contains a flash presentation. I currently have it resizing the user's web page and placing it on the screen using this script: onLoad="javascript:moveTo(((screen.availWidth*.5)-500),((screen.availHeight*.5)-300)); window.resizeTo(1000,550); ">
19
13041
by: Albretch | last post by:
Hi, client wants for a window with no toolbars to open (technical and 'esthetical' reasons) after the window, user clicks on, is being closed. I told them about security settings in browsers and no cross-browsers solutions and all of that we know, but they have told me they have seen that before and how then the annoying pop-up windows work? . . .
2
357
by: John Galt | last post by:
I noticed that the Visual Studio.NET statusbar on one of my development machines has disappeared. I.e., the IDE statusbar, not the form control. Does anyone know how to restore it? (It doesn't appear to be in View/Toolbars.)
4
8576
by: Karl Irvin | last post by:
In a 2000, can you transfer custom menus and toolbars to a new Access database. My mdf file is not compiling and I'm importing all data to a new database but don't see a way to get the menus/toolbars over.
1
2647
by: Mario Crevits | last post by:
My name is Mario Crevits, I'm from Belgium (Roeselare) and I'm working with Access97 for several years now. We are in an Access97-2000 migration project. I'm writing a wizard for the end-users to automatically find and convert their Access97 databases on a specific drive. I want to convert the databases through VBA : 1. create an empty Access2000 2. set the right properties and references 3. import the objects (tables, queries,...
1
1799
by: MacDermott | last post by:
I have an MDB file which is secured using a custom MDW file. I'd like to have most users see only the shortened menu you see when you set the Startup option "Allow full menus" to False. But the administrator should be able to see the full menus, plus toolbars. The shift-bypass key is disabled; too many people know about it. If I allow toolbars at startup, I can't seem to set the visible property of either the "Form View" or...
4
1656
by: MLH | last post by:
Is there a simple way to hide built-in toolbars in A97?
1
1473
by: Free BSD | last post by:
Hi, Is there a possibility that i can control the toolbars from my javascript code snippet ??? like ... make a window with my custom toolbars or like window.open .. with now toolbars
2
1883
by: =?Utf-8?B?Q3VydA==?= | last post by:
I'm working on a web application that hides all of the tool bars in IE from the user. I know there are a number of discussion about not doing this. It's a third party application that I'm adding fucntionality to through the tool bars. I can turn the toolbars back on but I get everything the Menubar, addressbar, standardbuttons bar, and linksbar. I would like to only turn on the links bar for the user that will have a number of shortcuts on...
0
8858
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8738
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9230
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8026
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5994
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4499
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4762
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3207
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2146
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.