473,386 Members | 1,819 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,386 software developers and data experts.

CommandBars code

Hi there people,

Is it possible to turn on/off functions in the "options screen" using
the "CommandBars" reference?

If it is possible, I cannot work out the syntax, but I assume it is
something along the lines of the following example:

CommandBars("Menu Bar").Controls("Tools").Controls("Options")....
..enabled = false

The main function I am looking to alter is to turn off "recent files
list"
I hope someone out there can assist.

Regards,

Nathan
Brisbane, Australia
Nov 13 '05 #1
2 2766
Hi Turtle,

Thanks for your response, I have not yet tested but sounds like it
will work well.

Do you know of any ways of programatically clearing the MRU File List
instead of disabling it?

Cheers,

Nathan

"MacDermott" <ma********@nospam.com> wrote in message news:<z1****************@newsread2.news.atl.earthl ink.net>...
Try this line of code:

application.setoption "Enable MRU File List", false

Most Access Options are available programmatically through SetOption, rather
than through the CommandBars object.

Note, however, that if you turn off this option programmatically, it will
stay off for any database on that PC - I'd want to be sure that was what my
users wanted before I programmed that!

HTH
- Turtle

"Nathan Bloomfield" <na**************@hotmail.com> wrote in message
news:4b**************************@posting.google.c om...
Hi there people,

Is it possible to turn on/off functions in the "options screen" using
the "CommandBars" reference?

If it is possible, I cannot work out the syntax, but I assume it is
something along the lines of the following example:

CommandBars("Menu Bar").Controls("Tools").Controls("Options")....
.enabled = false

The main function I am looking to alter is to turn off "recent files
list"
I hope someone out there can assist.

Regards,

Nathan
Brisbane, Australia

Nov 13 '05 #2
I would expect that the MRU File List is kept in the registry, so it should
be possible to clear it using API calls.

However, this is also an option setting which is shared across all MDBs on
that PC. So a user attempting to open another Access database from that MRU
might not be happy if your program has deleted his entries. If I were such
a user, I certainly wouldn't be happy.

Perhaps you could explain a bit more about your need for this feature?

- Turtle

"Nathan Bloomfield" <na**************@hotmail.com> wrote in message
news:4b**************************@posting.google.c om...
Hi Turtle,

Thanks for your response, I have not yet tested but sounds like it
will work well.

Do you know of any ways of programatically clearing the MRU File List
instead of disabling it?

Cheers,

Nathan

"MacDermott" <ma********@nospam.com> wrote in message

news:<z1****************@newsread2.news.atl.earthl ink.net>...
Try this line of code:

application.setoption "Enable MRU File List", false

Most Access Options are available programmatically through SetOption, rather than through the CommandBars object.

Note, however, that if you turn off this option programmatically, it will stay off for any database on that PC - I'd want to be sure that was what my users wanted before I programmed that!

HTH
- Turtle

"Nathan Bloomfield" <na**************@hotmail.com> wrote in message
news:4b**************************@posting.google.c om...
Hi there people,

Is it possible to turn on/off functions in the "options screen" using
the "CommandBars" reference?

If it is possible, I cannot work out the syntax, but I assume it is
something along the lines of the following example:

CommandBars("Menu Bar").Controls("Tools").Controls("Options")....
.enabled = false

The main function I am looking to alter is to turn off "recent files
list"
I hope someone out there can assist.

Regards,

Nathan
Brisbane, Australia

Nov 13 '05 #3

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

Similar topics

5
by: Steve | last post by:
I have Access97, 2000 and XP installed. I'm developing an Access97 project for a client. I have the following code in the Open event of a form: Dim Cbr As Object Dim Ctl As Object On Error GoTo...
1
by: deko | last post by:
I'm trying to prevent any built-in command bars or menu bars from appearing in an Access MDE. I have the following code on the Form_Open event of the app's main form: CommandBars("Menu...
4
by: Anushya | last post by:
Hi I am creating a outlook addins and in that OnConnection i am creating a toolbar(Commandbars). the code is working fine.. But the problem is when i access a custom form on the click of a...
5
by: Hari Shankar V | last post by:
Dear all I am a windows application developer. I want to add office like command bars, toolbars or menubars in my application. Please tell me which component i need to include to achieve this. i...
0
by: Joanna Carter \(TeamB\) | last post by:
Hi I have used this code in an Add-In in VS2003 : CommandBar mainMenu = cmdBars; Now I find in VS2005, that _DTE.CommandBars is a __ComObject and does not work in this situation. How do...
0
by: SunSet | last post by:
Hello togehther, i want to add a new Popup to the Contextmenue in Word (Right click on the textbody) which all is included in an AddIn. To add a new button works fine with these piece of code: ...
1
by: robert.waters | last post by:
Does anyone know of any code to organize or condense the access commandbars? Access doesn't really intuitively place them, and I find myself having to move them around once they've been enabled; I...
0
by: robert.waters | last post by:
I recently 'messed with' the CommandBars on one of my apps, in the process of learning how to create custom menus and disable default ones. Unfortunately, now *every* Access database I open...
1
by: cyberbhaskar | last post by:
Hi, I am working on a ASP.net application. one of my project requirment is showing msWord on asp.net page and user can edit and save the file to DB. I am showing the word using dsoframer OCX...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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...

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.