Custom Menu Bars

A

Al Camp

I have a report where the default menubar is the Access default report
menubar.
I built a custom menubar that only has a Close button on it, and no Print
buttons. (NoReportPrint)
On the OnOpen for the report...

Private Sub Report_Open(Cancel As Integer)
If Forms!frmLoomTicketDialog!cmdLoomSetupTickets.Caption = "Preview
Ticket" Then
Me.MenuBar = "NoReportPrint"
Else
Me.MenuBar = ""
End If
End Sub

Works great for me, and according to a criteria shows the NoPrint menu, or
the regular menu properly

When I send that report to my user, they get a "Can't find object
NoReportPrint." when opening.

How can I send that custom menu to the user, so the report will be able to
find it?
Where are custom menus kept/stored?

Thanks
Al
 
R

Rick Brandt

Al said:
I have a report where the default menubar is the Access default report
menubar.
I built a custom menubar that only has a Close button on it, and no
Print buttons. (NoReportPrint)
On the OnOpen for the report...

Private Sub Report_Open(Cancel As Integer)
If Forms!frmLoomTicketDialog!cmdLoomSetupTickets.Caption =
"Preview Ticket" Then
Me.MenuBar = "NoReportPrint"
Else
Me.MenuBar = ""
End If
End Sub

Works great for me, and according to a criteria shows the NoPrint
menu, or the regular menu properly

When I send that report to my user, they get a "Can't find object
NoReportPrint." when opening.

How can I send that custom menu to the user, so the report will be
able to find it?
Where are custom menus kept/stored?

Thanks
Al

First off, you don't need to assign the MenuBar in code. There is a
property of the report on the {Other} tab of the property sheet where you
can just enter it.

To get it to the other person (not sure why you are not just giving them the
entire file), they can use...

File
Get External Data
Import

....to import the report and when the import dialog is displayed they can hit
the [Options] button which will offer a few more choices one of which is to
include Menus and Toolbars. They won't be able to select just that one, but
they can import ALL of the custom menus and toolbars from your file which
will give them the one for your report.
 
A

Al Camp

Rick
Thanks for the reply.
You wrote...
First off, you don't need to assign the MenuBar in code. There is a
property of the report on the {Other} tab of the property sheet where you
I agree, and the default is "" ... (the normal system default menu), but
at report Load I need to decide which menu will be used. My OnLoad Menubar
code utilizes that property.

I should have mentioned that I was asking the question because I wanted
to avoid sending the MDB file to the user, and doing an Import (and
definitely not just for the sake of one menubar). The MDB is 18MB in size,
and we'll have ISP problems with that file size.
I wrote...So I guess you're saying those custom menus aren't really an individual
object that exist somewhere, and can be seen, or handled, or altered... by
means other than through the menu Customize function?
Bummer!

Thanks for the reply, I appreciate the help,
Al Camp

Rick Brandt said:
Al said:
I have a report where the default menubar is the Access default report
menubar.
I built a custom menubar that only has a Close button on it, and no
Print buttons. (NoReportPrint)
On the OnOpen for the report...

Private Sub Report_Open(Cancel As Integer)
If Forms!frmLoomTicketDialog!cmdLoomSetupTickets.Caption =
"Preview Ticket" Then
Me.MenuBar = "NoReportPrint"
Else
Me.MenuBar = ""
End If
End Sub

Works great for me, and according to a criteria shows the NoPrint
menu, or the regular menu properly

When I send that report to my user, they get a "Can't find object
NoReportPrint." when opening.

How can I send that custom menu to the user, so the report will be
able to find it?
Where are custom menus kept/stored?

Thanks
Al

First off, you don't need to assign the MenuBar in code. There is a
property of the report on the {Other} tab of the property sheet where you
can just enter it.

To get it to the other person (not sure why you are not just giving them
the
entire file), they can use...

File
Get External Data
Import

...to import the report and when the import dialog is displayed they can
hit
the [Options] button which will offer a few more choices one of which is
to
include Menus and Toolbars. They won't be able to select just that one,
but
they can import ALL of the custom menus and toolbars from your file which
will give them the one for your report.
 

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

Similar Threads


Top