![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
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? |
#3
| |||
| |||
|
|
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 |
#4
| |||
| |||
|
|
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? |
#5
| |||
| |||
|
|
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? |
#6
| |||
| |||
|
|
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" <nospam (AT) nospam (DOT) net> wrote in message news:frhZi.4926$yV6.4292 (AT) newssvr25 (DOT) news.prodigy.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? |
#7
| |||
| |||
|
|
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.com> wrote in message news:uFdZ7L6IIHA.4808 (AT) TK2MSFTNGP05 (DOT) 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" <nospam (AT) nospam (DOT) net> wrote in message news:frhZi.4926$yV6.4292 (AT) newssvr25 (DOT) news.prodigy.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? |
#8
| |||
| |||
|
#9
| |||
| |||
|
|
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 |
#10
| |||
| |||
|
|
On Nov 10, 7:25 am, "Neil" <nos... (AT) nospam (DOT) net> 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? A Hack: I create a command bar "Employee Attendance Entries". I store a copy in CommandBarsHolder.mdb To create a copy I run a hack: Public Sub AirCodeInHackersVille() With Application .CommandBars("Employee Attendance Entries").Name = "Whatever" With WizHook .Key = 51488399 .WizCopyCmdbars "CommandBarsHolder.mdb" End With .CommandBars("Employee Attendance Entries").Name = "Employee Attendance Entries" & Format(Now(), "yyyymmddhhnnss") .CommandBars("Whatever").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. |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |