Buttons on a report

R

Robert

Is there any way to put a command button on the toolbar of a report (or
anywhere else on the report)?

Robert
 
M

Marshall Barton

Robert said:
Is there any way to put a command button on the toolbar of a report (or
anywhere else on the report)?


Not on the report.

But you can create a custom tool/menu bar and put whatever
you want on it. Set the report's ToolBar or MenuBar
property to the tool/menu bar's caption to make it appear
whenever the report preview opens.
 
M

Marshall Barton

Right click on an existing tool/menu bar and select
Customize...

Then create a ***new*** bar (don't mess with the existing
tool/menu bars) and play around with adding commandbar
controls to achieve the effect you want. VBA Help on Create
a toolbar should get you started.

To run your own code from a toolbar button, put the code in
a public function in a standard module and set the button's
OnAction property to the function name.
 
R

Robert

Thanks. I will give it a try.


Marshall Barton said:
Right click on an existing tool/menu bar and select
Customize...

Then create a ***new*** bar (don't mess with the existing
tool/menu bars) and play around with adding commandbar
controls to achieve the effect you want. VBA Help on Create
a toolbar should get you started.

To run your own code from a toolbar button, put the code in
a public function in a standard module and set the button's
OnAction property to the function name.
--
Marsh
MVP [MS Access]


Robert said:
Thank you. How do I create the custom tool/menu bar?
 
R

Robert

Thanks. I'll give it a try.
Marshall Barton said:
Right click on an existing tool/menu bar and select
Customize...

Then create a ***new*** bar (don't mess with the existing
tool/menu bars) and play around with adding commandbar
controls to achieve the effect you want. VBA Help on Create
a toolbar should get you started.

To run your own code from a toolbar button, put the code in
a public function in a standard module and set the button's
OnAction property to the function name.
--
Marsh
MVP [MS Access]


Robert said:
Thank you. How do I create the custom tool/menu bar?
 

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