473,422 Members | 1,962 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,422 software developers and data experts.

Bringing Custom Toolbars back to Acc rt

One of my clients is using Acc97 runtime to run an Access application.
The application has a Custom Toolbar, but she excluded the toolbar from
the application.
Now, I cannot display the toolbar again.
Because it is a runtime, there is no "View" menu.
I tried to replace the application with a zipped copy, but even that
did not bring the toolbar back.
Is there any way to bring the toolbar back?
Thanks in advance.

Nov 28 '05 #1
5 2447
I have code called from my Menu to make my toolbars visible or invisible.

Also, I have set the property for my custom toolbars
and Menu to not allow hiding or moving

You should do that in the future.

For now, she can delete from the registry
HKEY CURRENT USER\SOFTWARE\MICROSOFT\OFFICE\8.0\ACCESS\SEETINGS \CommandBars

Then replace the application with a zipped copy

And the default settings will be restored for her.

(david)
"Mary Anne" <ki*******@hotmail.com> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
One of my clients is using Acc97 runtime to run an Access application.
The application has a Custom Toolbar, but she excluded the toolbar from
the application.
Now, I cannot display the toolbar again.
Because it is a runtime, there is no "View" menu.
I tried to replace the application with a zipped copy, but even that
did not bring the toolbar back.
Is there any way to bring the toolbar back?
Thanks in advance.

Nov 28 '05 #2
This was written in 1998. At that time it worked for AC97. If I were
going to use it I would test it first on copies of the two DBs
involved. It is run from the receiving DB.

Sub test()
GetMenus "C:\My Documents\Access\Elementary Formula\Elementary
Formula Application.mdb", _
"Elementary Formula"
End Sub

Sub GetMenus(ByVal dbsName As String, ParamArray MenuNames())
Dim bConfirmActionQueries As Boolean
Dim vMenuName As Variant
Dim rst As Recordset

On Error Resume Next

bConfirmActionQueries = GetOption("Confirm Action Queries")
If bConfirmActionQueries Then SetOption "Confirm Action Queries",
False

With DBEngine(0)(0)

Err = 0
.TableDefs("MSysCmdBars").Name = .TableDefs("MSysCmdBars").Name
If Err = 3265 Then 'table doesn't exist
.Execute "SELECT * INTO MSysCmdBars " _
& "FROM MSysCmdBars IN '" & dbsName & "' WHERE NO;"
.Execute "CREATE INDEX TbIndex ON MSysCmdBars (TbName) WITH
PRIMARY;"
End If
On Error GoTo 0
If UBound(MenuNames) = -1 Then 'no elements
.Execute "INSERT INTO MSysCmdBars " _
& "SELECT * FROM MSysCmdBars IN '" & dbsName & "';"
Else
For Each vMenuName In MenuNames
.Execute "INSERT INTO MSysCmdBars " _
& "SELECT * FROM MSysCmdBars IN '" & dbsName & "' " _
& "WHERE TBName = '" & vMenuName & "';"
Next vMenuName
End If

.TableDefs.Refresh
Set rst = .TableDefs("MSysCmdBars").OpenRecordset
With rst
If Not (.BOF = True And .EOF = True) Then
.MoveFirst
On Error Resume Next
Do
CommandBars.Add (!TBName)
.MoveNext
Loop Until .EOF
On Error GoTo 0
End If
End With
Set rst = Nothing
End With

If bConfirmActionQueries Then SetOption "Confirm Action Queries",
True

End Sub

Nov 28 '05 #3
Lyle Fairfield wrote:
This was written in 1998. At that time it worked for AC97. If I were
going to use it I would test it first on copies of the two DBs
involved. It is run from the receiving DB.

[snip code]

Wow, but I don't think the problem lie with the toolbar dissapearing
entirely, it was just hidden, a simple DoCmd.ShowToolBar would have
sufficed :-)
Nov 29 '05 #4
Sounds good to me! :-)
I suspect that
DoCmd.ShowToolBar
is a better command than
DoCmd.RecoverOldLostCode
anyway.

Nov 29 '05 #5
Thank you for a lot of ideas.

I wan't keen on changing registry, so I decided to go with code.
DoCmd.ShowToolBar worked for them.
I'll make sure from now on to set the property to not allow hiding or
moving.

I'm so glad I asked the question here.
Thanks very much.

Nov 30 '05 #6

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

Similar topics

3
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: ...
4
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...
3
by: Shane | last post by:
I am trying to create a custom command bar with three custom buttons, however when I try to make the procedure there is no "CommandBar" option to choose from and is not recognized for the...
1
by: jeff blumsom | last post by:
This is bizarre! I have an big (90+ tables, over 100 forms) application that has a custom toolbar. This is set as the default toolbar in the start-up options. It is also the toolbar assigned to...
27
by: Wayne | last post by:
I've been clicking around Access 2007 Beta 2 and can't see the custom menu bar designer. Is it in the beta? Maybe I'm blind. The question that comes to mind is: Will custom menu bars be the same...
1
by: Ron | last post by:
Hi All, I'm using A2K and I've got it set up with a front end and back end. I've made changes to toolbars, got some custom ones working, etc...everything is going good. However, I think I need...
0
by: Bower | last post by:
Hi, Im developing an access database that checks the users windows log in details then sets up diffrent toolbars depending on the username. Iv got the adding bit sorted. The problem is when you...
5
by: Rick | last post by:
I'm moving Access2000/2003 apps into Access2007 running on XPpro Dells. I've found where to lower the macro security and with a tweak to references have allowed me to use my custom toolbars...
0
by: Sky | last post by:
I have an Access 2003 front-end database with custom toolbars. The toolbars work fine. One annoying feature is that at the far right edge of each custom toolbar there a small dropdown arrow....
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
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...

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.