Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Add a Customised ToolBar to a Report in Access97 1

Status
Not open for further replies.

jojones

Programmer
Dec 4, 2000
104
AU
Having problems adding a customised toolbar to an Access report and form. Does anyone have some code that will create a toolbar with at least one button on it, perhaps one standard Print button and one customised macro button.

Cheers
Jo
 
You have to first create the toolbar by going to the View menu, then toolbars then customize. Click new, give it a name and then drag some commands on to it from the commands window. Then you can use DoCmd.ShowToolbar "NewToolbarName", acToolbarYes
 
Thanks Pezamystik

What if I want to add my own buttons which run procedures or functions I have written?

Cheers
Jo Cheers
Jo Jones
 
You'd have to have a macro first. You can add macros to your new custom toolbar. But not VBA code directly. So create a new macro that uses the RunCode function to call your VBA. Then under the commands tab of the customize window there is a menu called All Macros click that and search for your macro. Good Luck!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top