Customized Tool Bars

P

Peter Hibbs

Hi All

I write small database apps for local companies, charities, etc. Just
before I deploy the final version to the client I create an mde front
end and a customized tool bar for each form and report with just the
icons they need.

While it is not difficult to to this each time it is a bit fiddly and
time consuming. Is there any way to copy/import a customized tool bar
from one database file to another and set the ToolBar property on each
form and report automatically.

Thank you.

Peter Hibbs.
 
R

Rick Brandt

Peter said:
Hi All

I write small database apps for local companies, charities, etc. Just
before I deploy the final version to the client I create an mde front
end and a customized tool bar for each form and report with just the
icons they need.

While it is not difficult to to this each time it is a bit fiddly and
time consuming. Is there any way to copy/import a customized tool bar
from one database file to another and set the ToolBar property on each
form and report automatically.

Thank you.

Peter Hibbs.

File
Get External Data
Import
(choose file)
[Options >>]
Menus and Toolbars

(you've never seen this?)
 
J

Jim Bunton

How to copy a tool bar - don't now!

However - how about creating a new database
with the toolbar definitions you want
then copy it to start each new application.

Also include a module with code that does something like

sub SetMyMenuBarsToFormsandReports()
for formNumber = 0 forms.count -1
forms(formnumber).Menubar = "MySpecialFormBar" ' or whatever
next 'formNumber
'and the same for reports
end sub
 
P

Peter Hibbs

Rick,

I have used the Import facility hundreds of times but I have never
clicked on the Options button. Just goes to show.. (how stupid am I).
Anyway that has solved one problem.

Jim,
Like your idea but cannot get it to work. Here is the code I am using,
(I guess you forgot the To in the For..Next loop). When I run it, it
goes through the loop once only and exits, and no forms get changed. I
am calling the code from a form. Any ideas.



Sub SetMyMenuBarsToFormsandReports()

Dim FormNumber As Long

For FormNumber = 0 To Forms.Count - 1
Forms(FormNumber).Toolbar = "CustomForms"
Next

End Sub



Peter Hibbs.
 
A

Albert D. Kallal

here is another tip:

My mdb actually have the menu bars all setup correctly. You want to be
developing and testing your application as how the users will see it.

Of course, during development, you will hold down the shift key so your
startup settings don't run. You then develop for awhile, and then to test in
"user" mode, you exit..and then re-enter the application without the shift
key bypassed. You will likely do this dance all day long as you run/test as
user mode, and then flip back in to developer mode (shift key used..so you
don't get the main custom menu). So, you can't develop, or really modify
things when you run your application with the startup settings...so you must
shift-by-pass them when you want to work.

And, in fact, I use alt-f4 to exit the application...the mdb file should
still be highlighted in the windows explore..so, then you hit enter key
(and, hold down shift key if you need be). This key stroke sequence and
exiting and re-entering the application will occur CONSTANTLY all day long
when you are developing.

When you finally have things just right...you create the mde
you plan to distribute. At that point, you will not have to do ONE thing in
terms of setting up the menu bars since you beeen using them, and testing
them all allong as you develop.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top