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

Tweaking the design

From: Access 2010: Forms and Reports in Depth

Video: Tweaking the design

At the end of Chapter 03, we took a look at connecting a user input form to a query which then passed data onto a Chart Object. We can do the same thing with a Report. I've got a workflow setup here called SalesByDivision; I am going to start with a SalesByDivision form here. I'll double-click on it to open it and I'll see that this form is asking me for a Geographical Division and a Year and I want to compare it to another Geographical Division and Year. Let's go ahead and fill in some boxes. I'll use the drop-down menus and choose I am interested in the New England Division for 2009 and now I want to compare that data to the Pacific Region for 2009 as well.

Tweaking the design

At the end of Chapter 03, we took a look at connecting a user input form to a query which then passed data onto a Chart Object. We can do the same thing with a Report. I've got a workflow setup here called SalesByDivision; I am going to start with a SalesByDivision form here. I'll double-click on it to open it and I'll see that this form is asking me for a Geographical Division and a Year and I want to compare it to another Geographical Division and Year. Let's go ahead and fill in some boxes. I'll use the drop-down menus and choose I am interested in the New England Division for 2009 and now I want to compare that data to the Pacific Region for 2009 as well.

Now I've got two buttons here as well. I can either Run the Query or I can Preview a Report. Let's go ahead and press the Preview Report button. I'll press Preview Report and the report generates, showing me New England for 2009 and here is the states and data and then if I scroll down, at the Pacific States 2009 with their states and data. I also have some calculated fields to the very bottom. Both this form and the report have had their designs refined quite a bit. So in this I want to dissect these elements to see how they were designed and some of the decisions that were made to get them to this point.

We'll start where the user starts with the form. I'll go ahead and close the report here and we'll take a look at this form in Design View. I'll switch to Design View here and we can see a couple of things on this form. First, there really aren't all that many elements. In the top left corner I have this logo and the bottom of the logo is a kind of a brown color and the top of this logo has this green color. I've put it in the top left corner of my form and in the top of the form I've put a rectangle. The rectangle is all of this area here in the orange. The rectangle color is set to the same green as my logo. The background of the details section of my report is set to the same color as this light brown.

Down in the bottom right corner I have a tree image. Again we're using the same light brown color for the background of that tree picture. Let's also take a look at this tree, if I click on it and go to the Arrange tab and take a look at it's anchoring here, we'll see that it's set to anchor to the bottom right corner. That means that no matter what size of screen the end-user is looking at, that tree image will always appear in the bottom right corner of their screen. At the top, I have a label. It's just been bolded text and set to white. And then I have my elements down here. I've got a couple of command buttons and I have some combo boxes.

Let's take a look at these combo boxes and I am going to go to the Design tab and turn on my Property Sheet. Let's click on the first combo box here. On the All tab, I'll see that this combo box has a name cbo_division. The box below it has a name as well, cbo_CompDivision. My Year boxes, they have names as well, cbo_Year and cbo_CompYear, so we can make reference to whatever the user selects here in our query later. So let's see where the data is coming from for these drop-down menus. I'll click on the first one again and go to the Data tab.

The Row Source is this SELECT query right here. Let's take a look at the query behind it. I'll press the Build button and we see that there is a pretty simple query, it's pulling in information from my States table and I've got my DivisionName and the DivisionID. I can also see that I am sorting on the DivisionID ascending, but I am not showing it in the list, so why do I have this part here? Well let me run the query and you could see. So when I run the query, I'll notice that my DivisionNames are listed in geographical order, not alphabetical order. And this is important for my end-users. This might be the order that they're more comfortable seeing this data presented in.

Let's go ahead and go back to Design View. And I'll close the query here, we'll take a look at the Year box, it has a Row Source as well, it's also a query, these are embedded queries. I can click the Build button to see its details and this is simply pulling out the Order Date from the Orders table and applying the Year function to it. So when I run it, it's just getting a list of Years that are available within my database. I'll close this out and take a look at the query now. So I've got the names of these boxes that the end-user selects.

Close out the form, and I am not going to save any changes. When I click on those buttons, the query runs. The query that runs is this one right here, the qry_SalesByDivision, I'll right-click on that and take a look in Design View. I'll close the Property Sheet here so I could see the whole thing. And this query is made up of four different tables; Products, Orders, Direct Customers, and States. And then down here in the Criteria, I right-click on this and say Zoom, we'll see the text of that Criteria. The Criteria for the Year field for instance is reading to pull the year from the combo box year on the SalesByDivision form or the CompYear from the combo box on the form.

Go ahead and say OK to that, we'll take a look at the other one; I'll click here, right-click and say Zoom. The Criteria for the DivisionName is also coming from the combo boxes on my form, the cbo_division or the cbo_CompDivision. So if it matches either of the selections from the form, it will show up in the query. Go ahead and say OK and I'll close the query, without saving any changes. The next thing that happens is that the report opens. This is the report down here, rpt_SalesByDivision-complete.

I'll right-click on it and switch to Design View. First we'll go to the Property Sheet and take a look at the Record Source for this report. I can see that it's a linked query, it's linked to that query we're just looking at, the qry_SalesByDivision-complete this is where the data is coming from. It's split into a couple of sections; I've got the Report Header here with the title. The Division Header Name that will show the division every time, the Year Header below that, a Detail section, the DivisionName Footer and scrolling down I've got a Page Footer and a Report Footer. Now each of these boxes have some interesting properties, for instance this SumOfPrice right here is the data that's coming from the query.

Down below that in the DivisionName Footer, I've got another box here that says Division Sales; this is calculating the total sales. And it says equals Sum of SumOfPrice (=Sum([SumOfPrice])). So it's adding up all of the fields here in the SumOfPrice column. But down below that in the Report Footer here, I've got another box and when I click on that I see that it has the exact same formula =Sum([SumOfPrice]), this one is getting the total value of the entire report. Because it's in the Report Footer section, it's aggregating over the entire report. Because this one is in the DivisionName Footer section, it's aggregating over the division name section.

So let's go ahead and close this report and we'll run through that workflow one more time. I'll double-click on the form to open it; I'll choose an area of interest. How about this time East South Central for the year 2009 and we want to compare it to the same section for 2008? We'll Preview the Report and that will open up in Print Preview mode with the data that I'm interested in. So the only thing different is between this and some of the forms and reports that we've created in this course is the amount of time spent fine-tuning the position of the elements, adjusting the colors and fonts and I'm going to admit it, sometimes obsessing over every single pixel.

Step one in creating your forms and reports should always be to get the functionality in place. If the form or report is exceptionally ugly, once it's functioning properly, all the rest is just moving the pieces around. And that part can take a while as you change your View Mode back and forth between Design View, Layout View and Form or Report View, sometimes moving elements one step at a time. It can be tedious sometimes, but the end result will look great and function great.

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 · 14461 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.