Hi all,
I have been playing with pivotcharts lately to display my data from my database. I have since found however that I will need to get rid of a lot of the "options" a user has to mess around with when I distribute out my database.
One of the easiest ways to do this has been to disable all menus and shortcut menus in my database using the startup properties. However I lose functionality in my pivot charts, namely the drill down / drill out / expand / collapse in the default shortcut menu.
I have found I can create my own and I have added the above functionality to my custom shortcut menu.
Now my issue is I have tried adding this menu to the forms properties but it still does not show.
Is this because of my startup options being incorrect?
How do I go about disabling all shortcuts/menus in my database but then allowing one to open for my pivot charts? Would creating a blank shortcut menu for all other forms do the trick and how would I go about enabling my other menu when I am on certain forms.
3 2505
Ok I have partially got this working (I created a custom shortcut menu) but I have a new issue.
When I open my subform up directly (which is set to pivotchart view) My menu works fine.
However when I open up my main form which displays this pivotchart within a subform my menu doesnt work... any ideas?
I have attached some images to show.
I have done some more messing by creating a toolbar menu as well to confirm the action isnt just a issue with the shortcut menu I made when I right click.
What happens is when I click into the subforms pivot chart and select a series or a text name on the x-axis that would normally allow a drilldown I get no options in my menus, they are all greyed out.
However if I allow my right click to popup the default menu and then do the same action I get the options popup on the default menu, without them being greyed out. I also see that my custom toolbar is now showing the options being available too.
In my limited experience this is clearly showing some form of focus issue with the selection. I need to somehow work out what the default menu is doing differently before opening compared to my custom menu...
any ideas on this?
OK I ditched the idea of my own custom menu as there was far to much headache in trying to figure out what was causing the focus issues.
Instead I did a lot of research into disabling menu controls. Long story short I have some very disgustingly ugly code.. that works. - Option Explicit
-
Option Compare Database
-
-
Private Sub Form_Close()
-
Dim myControls As CommandBarControls
-
Dim ctl As CommandBarControl
-
Dim mykilling As CommandBarControls
-
Dim byechart As CommandBarControls
-
Dim byefilter As CommandBarControls
-
Dim byecalc As CommandBarControls
-
-
Set myControls = CommandBars.FindControls _
-
(Type:=msoControlButton, Id:=501) 'field list
-
-
Set mykilling = CommandBars.FindControls(msoControlButton, 222) ' properties
-
Set byechart = CommandBars.FindControls(msoControlButton, 6450) 'chart
-
Set byefilter = CommandBars.FindControls(msoControlButton, 5884) 'filter
-
Set byecalc = CommandBars.FindControls(msoControlButtonPopup, 6700) 'calc
-
-
-
For Each ctl In myControls
-
ctl.Visible = True
-
-
Next ctl
-
-
For Each ctl In mykilling
-
ctl.Visible = True
-
-
Next ctl
-
-
For Each ctl In byechart
-
ctl.Visible = True
-
-
Next ctl
-
-
For Each ctl In byefilter
-
ctl.Visible = True
-
-
Next ctl
-
-
For Each ctl In byecalc
-
ctl.Visible = True
-
Next ctl
-
End Sub
-
-
Private Sub Form_Open(Cancel As Integer)
-
Dim myControls As CommandBarControls
-
Dim ctl As CommandBarControl
-
Dim mykilling As CommandBarControls
-
Dim byechart As CommandBarControls
-
Dim byefilter As CommandBarControls
-
Dim byecalc As CommandBarControls
-
-
Set myControls = CommandBars.FindControls _
-
(Type:=msoControlButton, Id:=501) 'field list
-
-
Set mykilling = CommandBars.FindControls(msoControlButton, 222) ' properties
-
Set byechart = CommandBars.FindControls(msoControlButton, 6450) 'chart
-
Set byefilter = CommandBars.FindControls(msoControlButton, 5884) 'filter
-
Set byecalc = CommandBars.FindControls(msoControlButtonPopup, 6700) 'calc
-
-
-
For Each ctl In myControls
-
ctl.Visible = False
-
-
Next ctl
-
-
For Each ctl In mykilling
-
ctl.Visible = False
-
-
Next ctl
-
-
For Each ctl In byechart
-
ctl.Visible = False
-
-
Next ctl
-
-
For Each ctl In byefilter
-
ctl.Visible = False
-
-
Next ctl
-
-
For Each ctl In byecalc
-
ctl.Visible = False
-
Next ctl
-
End Sub
-
-
-
No error handling as of yet.. but I expect it to suck.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Lex |
last post by:
I am writing a C# app that has a Menu. Some of the menu items will
have short cuts that do not exist in the Shortcut enum. I would like
the custom shortcuts to appear on the menu but as far as I...
|
by: Terry Bell |
last post by:
I have some code that adds entries to the "Module Compiled" popup
menu. Works fine in A97. You can open a module, right click, and the
new entries are there for you to click. I converted it to...
|
by: JMCN |
last post by:
hi
i'm having a problem with the customize a shortcut menu. i read the ms
office assistance: customize a shortcut menu/delete a command or add
to a shortcut menu and followed the simple...
|
by: Steven |
last post by:
I have some text boxes on a form in MS Access 2000. When I right click
in them I don't get any shortcut menu at all. I want the normal cut,
copy, and past menu to come up.
In the "Startup", I...
|
by: downwitch |
last post by:
Hi all,
I've read through the archives on this, and scoured the web, to little
avail.
There has to be a way to move custom menu bars (or menubars, or command
bars, or popup command bars, or...
|
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,...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: aa123db |
last post by:
Variable and constants
Use var or let for variables and const fror constants.
Var foo ='bar';
Let foo ='bar';const baz ='bar';
Functions
function $name$ ($parameters$) {
}
...
|
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...
|
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
|
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...
|
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...
|
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,...
|
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...
| |