Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member

Understanding the subform control

From: Access 2010: Forms and Reports in Depth

Video: Understanding the subform control

Subform controls allow you to create linked table like displays of information that are related to a main topic. We saw an example of a subform briefly at the beginning of this course when we used the form wizard to display a list of all of the orders that included a specific product. Let's now duplicate that form manually using the subform control. I'm going to go to the Create tab or the ribbon, and we will create a New Form in Design View here. The first thing that we want to do is link this to the table that we want to be the main topic. In this case, we want to have a form that displays products at the top and then down below, will list a table with all of the orders that included that product.

Understanding the subform control

Subform controls allow you to create linked table like displays of information that are related to a main topic. We saw an example of a subform briefly at the beginning of this course when we used the form wizard to display a list of all of the orders that included a specific product. Let's now duplicate that form manually using the subform control. I'm going to go to the Create tab or the ribbon, and we will create a New Form in Design View here. The first thing that we want to do is link this to the table that we want to be the main topic. In this case, we want to have a form that displays products at the top and then down below, will list a table with all of the orders that included that product.

I will go to my Add Existing Fields here, I will Show All Tables and for my Products table I will expand it here, I will double-click on ProductID and double-click on ProductName. That'll add both of those fields to my form. I will go ahead and make this wider, because I know that my ProductNames are fairly long, and I am going to highlight both of these and I am going to push them up to the top with the arrow keys, okay. Let's go ahead and close the Field List here and I'm going to scroll down to the bottom of my form and make it a little shorter, so that it all fits on the screen. So Subform tool takes up a lot of real estate, which makes it a great and ideal opportunity to make use of a Tab Control.

The Tab Control if you remember is right here, I will click on it in the Control section of the Design tab and I will drag out a Tab Control, like that. Access places two tabs here. In the first tab I'm going to place my Subform, so I will click here to select the Tab and then I will find my Subform, I will use the down arrow or the more button, and the Subform button is this one right there. I will click on Subform and come down into my tab, well, it turns black. The next thing I am going to do is go inside of this tab, so I will drag out the area that I want my Subform. There, and the wizard starts. And the first page of the wizard is going to ask us where is our data coming from? Do you want to use an existing Table and Query or Do you want to use an existing form? Let's go ahead and use an existing Table and Query, we will go ahead and say Next.

We are going to build a table that displays order information for the product that we selected on the main part of the form. I will switch my table here, to the orders table and from there I will choose the OrderID and the ProductID. We also want to find out who ordered this product? So I will go back up here and I will choose my Direct Customers table. And I will choose First Name and Last Name. Let's go ahead and say Next. Access then asks how does that data in the subform relate to the data in the main part of the form up here? We can either Choose from the list or Define my own relationship. Now because we've already have a relationship that's been established in this database, Access has already correctly identified how they relate.

So I will just take that and go ahead and say Next. We can go ahead and name our Subform, it's going to appear down here at the Navigation Pane, or we can just accept the default. I will just leave as it is and say Finish. Access adds in the subform into our tab, now we can add another form into the second tab here, for instance, I will switch to this one that says Page4 and we will go up and add another subform down here. I will click the down arrow, the Subform tool, and I will just click, to put in there. This time instead of building a new table, we will use an existing form. I am going to choose the Reviews form. This is the one that has product reviews. I will go ahead and say Next, Access again asks me, well how does this relate to what I have selected up in the main section, and it's correctly identified that relationship.

So I will go ahead and say Next again, and we will just accept the default and say Finish. Access places that in my tab as well. Now let's go ahead and rearrange these a little bit. First of all I'm going to rename the tabs up here, so I don't need labels inside here. So I am going to go ahead and delete the label and then I will select the form, and I will resize it, so it fits inside the tab better. Next I will go to the other tab; I will do the same thing. I will delete the label and I will move this into position. Finally, I want to rename these tabs. And I can do that in the Property Sheet. I will select the tab, and the Caption property here, on this first one I'm going to put Orders.

I will press Enter and I will go to the next tab. And here the Caption will be Reviews and I will press Enter again. Okay, let's go back into our form and see how those all are working. We will switch it to Form View. Right now I am on my first product of 90. I can scroll to the different products that we have, as I do so I get an updated table here that shows me all of the Orders that has been placed for that specific product, and if I go to the Reviews tab, I can see reviews that might have been made on this product. So now I have an easy way to review lots of information about a specific product, all in one simple form.

The subform object brings in yet another way to view your content by displaying information that is related to a single record. Pairing the subform with the tab control also allowed us to keep related information together in one space efficient location, so that it is easy to get to.

Show transcript

This video is part of

Image for Access 2010: Forms and Reports in Depth
Access 2010: Forms and Reports in Depth

38 video lessons · 14431 viewers

Adam Wilbert
Author

 
Expand all | Collapse all
  1. 1m 27s
    1. Welcome
      1m 2s
    2. Using the exercise files
      25s
  2. 15m 53s
    1. Introducing forms
      2m 41s
    2. Designing for the end user
      45s
    3. Exploring the database
      1m 49s
    4. Creating a form with the Form Wizard
      6m 43s
    5. Refining the form in Layout view
      3m 55s
  3. 24m 33s
    1. Organizing the form elements
      7m 14s
    2. Formatting
      4m 48s
    3. Modifying the form through its properties
      6m 56s
    4. Adding a header and some polish
      5m 35s
  4. 1h 2m
    1. Introducing form controls
      3m 48s
    2. Using lines and rectangles
      2m 48s
    3. Organizing screen space with tabs
      4m 47s
    4. Adding buttons
      5m 3s
    5. Linking to external content
      4m 15s
    6. Entering and selecting data
      5m 8s
    7. Controlling input with option groups
      6m 0s
    8. Attaching documents
      6m 49s
    9. Attaching images
      5m 8s
    10. Understanding the subform control
      4m 13s
    11. Adding charts
      7m 9s
    12. Linking controls
      7m 41s
  5. 21m 42s
    1. Creating the main menu
      8m 49s
    2. Adding a splash screen with startup options
      5m 35s
    3. Creating a customer form
      7m 18s
  6. 45m 20s
    1. Grouping and sorting data
      4m 36s
    2. Understanding report structure
      6m 12s
    3. Building reports from wizards
      5m 0s
    4. Building reports from queries
      6m 34s
    5. Formatting conditionally
      6m 59s
    6. Calculating fields
      4m 35s
    7. Adding the finishing touches
      4m 49s
    8. Populating pre-printed documents
      6m 35s
  7. 15m 8s
    1. Printing reports
      3m 6s
    2. Tweaking the design
      7m 10s
    3. Automating the workflow with macros
      4m 52s
  8. 58s
    1. Next steps
      58s

Start learning today

Get unlimited access to all courses for just $25/month.

Become a member
Sometimes @lynda teaches me how to use a program and sometimes Lynda.com changes my life forever. @JosefShutter
@lynda lynda.com is an absolute life saver when it comes to learning todays software. Definitely recommend it! #higherlearning @Michael_Caraway
@lynda The best thing online! Your database of courses is great! To the mark and very helpful. Thanks! @ru22more
Got to create something yesterday I never thought I could do. #thanks @lynda @Ngventurella
I really do love @lynda as a learning platform. Never stop learning and developing, it’s probably our greatest gift as a species! @soundslikedavid
@lynda just subscribed to lynda.com all I can say its brilliant join now trust me @ButchSamurai
@lynda is an awesome resource. The membership is priceless if you take advantage of it. @diabetic_techie
One of the best decision I made this year. Buy a 1yr subscription to @lynda @cybercaptive
guys lynda.com (@lynda) is the best. So far I’ve learned Java, principles of OO programming, and now learning about MS project @lucasmitchell
Signed back up to @lynda dot com. I’ve missed it!! Proper geeking out right now! #timetolearn #geek @JayGodbold
Share a link to this course

What are exercise files?

Exercise files are the same files the author uses in the course. Save time by downloading the author's files instead of setting up your own files, and learn by following along with the instructor.

Can I take this course without the exercise files?

Yes! If you decide you would like the exercise files later, you can upgrade to a premium account any time.

Become a member Download sample files See plans and pricing

Please wait... please wait ...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.


Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ.

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

Join now "Already a member? Log in

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.


Mark all as unwatched Cancel

Congratulations

You have completed Access 2010: Forms and Reports in Depth.

Return to your organization's learning portal to continue training, or close this page.


OK
Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

Get started

Already a member?

Become a member to like this course.

Join today and get unlimited access to the entire library of video courses.

Get started

Already a member?

Exercise files

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships. Learn more

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

The classic layout automatically defaults to the latest Flash Player.

To choose a different player, hold the cursor over your name at the top right of any lynda.com page and choose Site preferencesfrom the dropdown menu.

Continue to classic layout Stay on new layout
Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.

Are you sure you want to delete this note?

No

Your file was successfully uploaded.

Thanks for signing up.

We’ll send you a confirmation email shortly.


Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

Here’s our privacy policy with more details about how we handle your information.

   
submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.