98.7% Of all customers recommend us, we're so confident about our results we publish all reviews and stats
View Live Stats View ReviewsPrevious article Next article Access articles
How To Use Tabs To Show Lots Of Related Data On One Form In Access
Tue 5th October 2010
Using the NorthWind database in Access 2010, let's create a simple Customer form. This method assumes that the tables are already set up in a database with the appropriate relationships. Open the database and go to the Create tab on the ribbon. Choose the Form Wizard button. Choose Table Customers and select the company name, first name and surname fields from the list. This is the basic customer information that will show on the main form. Choose a layout and then opt to open the form in design view.
Increase the size of the Detail band. In the 'Form Design Tools' tab that will appear on the ribbon, choose the Tab control present on the design tab. Draw a tab onto the Detail area of the form. The default will be two tabs, but more can be added or one taken away by right clicking and choosing to insert or delete a page. Save the form. The next step is to add a sub form containing all the orders onto the tab. If you use the wizard correctly, this will then automatically only show the orders related to the customer on the current form.
In this instance you would create a sub form with the orders on it first. This form would then be placed directly on the tab and linked to the Customer record so that only orders for the customer showing on the form will show on the sub form. We will assume that there is already a form set up called Orders which contains the Order ID, Ship date, Order Date and the Customer ID. Usually when linking on fields I add them to the sub form and simply hide them if they are not required to be visible. It may be unnecessary for example, to have Customer ID on the sub form if it is already present on the main form. Add the sub form to the tab by going to the Design tab on the ribbon and clicking on the sub form button. Note that you must first scroll down to it. Draw a sub form on the tab. A wizard will appear automatically. Choose Use an Existing Form and select the Orders form from the list.
Click next and choose 'Show Orders for Each Record In Customers Using Customer ID.' This is telling Access to add the sub form, but only show the orders for the particular customer record that is being viewed at the time by the user. Access will automatically give you such options for any existing links that it recognises or you have the option to set up your own links. Click finish and view the form in Form View. It should contain the first customer record details and the tab should hold a sub form showing the first order for that customer. If the sub form as in Northwind is set up in columnar format then the user will have to scroll along to see each record in turn on the sub form. It may be better to ensure the sub form is set up in tabular format so that the user can see a simple list of all the orders the customer record is linked to.
With this simple tab method a user can set up forms that have all the related information in one place. Data can be entered on the sub forms in the same way as a main form meaning less time searching for records in multiple form locations.
Author is a freelance copywriter. For more information on an access.course, please visit https://www.stl-training.co.uk
Original article appears here:
https://www.stl-training.co.uk/article-1167-how-use-tabs-show-lots-related-data-on-one-form-in-access.html
London's widest choice in
dates, venues, and prices
Public Schedule:
On-site / Closed company:
TestimonialsKerry Foods
Finance Analyst Kate Garnham Excel Advanced Really enjoyed the course!! Kier Highways
Head Of Administration Damian Foley Excel Advanced Excellent course and deliverd at the right pace to interactive REL Field Marketing
Regional Sales Manager Hannah Tainton Excel Advanced Everything was fab but the presentation and examples could have been a little more snazzier looking! |
PUBLICATION GUIDELINES