Skip to main content

Access Junkie - MVP Alumnus

Access Inside Out Books
Access 2010 FAQ
Access 2007 Training
Access 2007 FAQ
Access 2007 KB Articles
Technical Articles
MSDN Articles
Contact Us
About Us
Member Login
Access 2010 FAQ


How do I add a new report into the Report Center for the Contacts 2010 Web Template?


This question came up in an online forum so I thought I'd create a new FAQ page in case other people wanted to know how to do this. Below are the steps I outlined to accomplish thsi goal.


1. Open the form called ReportCenter in Layout view from the Navigation Pane.


2. On the far right side of the form, you'll see a listing of each report in the web database. All of these reports are lauched from a command button, even though it looks like these are just hyperlinks on the right side.


3. Select the Command Button control from the Controls group on the Ribbon and drop in a new command button control in the empty cell beneath the last report option (Contact List). Access creates a new command button and formats it just like the other command buttons above it. (Access has already done all the formatting work for you here.)


4. Select that command button and change the Caption property on the Property Sheet window to what you want.


5. You now need to create the macro logic in the On Click event for this command button. The easiest way is to copy the logic from another command button by following the next steps.


6. Find the On Click event property for your new command button on the Property Sheet window and then click the Builder button (...) to open the macro design surface.


7. On the right side of the macro design surface, you'll see the new Action Catalog.


8. At the bottom of the Action Catalog, expand the In This Database node. Next, expand the Forms node. Finally, expand the form node called ReportCenter. You'll see a list of each control that has macro logic assigned to it.


9. Pick one of the command button actions - I used cmdContactList.OnClick - and then click and drag that macro onto the main macro design surface. Poof, Access makes a copy of all the logic behind that command button for your new command button like magic.


10. One last step is to make sure the macro logic opens up your new report. On the macro design surface, you'll see the BrowseTo action and all of its arguments. Change the Object Name argument here to open your new report.


11. Save the changes to the macro, close the macro window, save the changes to the form, close the form, and then open up the Main form and try it out.


That should do it.



See more tips and tricks like this in my book: Microsoft Access 2010 Inside Out




Back to FAQ main page