I have the following code in the on_load of all of my forms to disable all menus:
Dim i As Integer
For i = 1 To CommandBars.Count
CommandBars(i).Enabled = False
Next i
The problem is that when I open a report in preview mode I cannot close, print, etc.
Two questions:
1. Is the above approach the best way to disable all menus and toolbars?
2. How do I add a custom toolbar (already created) to the report preview only. I've tried doing in in the properties and by me.toolbar = "custom toolbar." Neither approach works. I suspect that the code I've used to disable the menus is keeping me from adding custom menus where I want them?
I should also mention that I have also turned off all of the menus, toolbars, etc. in the options/startup.
Thanks for your help!
Dim i As Integer
For i = 1 To CommandBars.Count
CommandBars(i).Enabled = False
Next i
The problem is that when I open a report in preview mode I cannot close, print, etc.
Two questions:
1. Is the above approach the best way to disable all menus and toolbars?
2. How do I add a custom toolbar (already created) to the report preview only. I've tried doing in in the properties and by me.toolbar = "custom toolbar." Neither approach works. I suspect that the code I've used to disable the menus is keeping me from adding custom menus where I want them?
I should also mention that I have also turned off all of the menus, toolbars, etc. in the options/startup.
Thanks for your help!
Last edited: