Start learning with our library of video tutorials taught by experts. Get started

Access 2010: Forms and Reports in Depth

Adding buttons


From:

Access 2010: Forms and Reports in Depth

with Adam Wilbert

Video: Adding buttons

Buttons are one of the key interactive elements that you'll use on forms. They instantly tell the end user that something will happen when I click there. Buttons will be linked to either Macros or Visual Basic code to control their behavior. Like the other controls, you add them to reports as well for navigation within your database. But the nice thing about buttons is that they don't print when you print your report. Let's take a look at adding some buttons to my Controls form. I'll right-click on that form in the Navigation pane and choose Design View. The Button control is this one right here, the rectangle at the Xs inside of it. I'll go ahead and click that once and click to add a button to my form.
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

Watch this entire course now—plus get access to every course in the library. Each course includes high-quality videos taught by expert instructors.

Become a member
Please wait...
Access 2010: Forms and Reports in Depth
3h 7m Intermediate Feb 14, 2012

Viewers: in countries Watching now:

Discover how to manage data entry and reporting tasks more efficiently using Access 2010. Author Adam Wilbert presents lessons on designing forms, organizing and displaying data with form controls, creating flexible queries, and building a form-based navigation system. The course also shows how to build reports from wizards and queries, highlight important data with conditional formatting, and automate reporting processes with macros.

Topics include:
  • Designing for the end user
  • Organizing form elements
  • Formatting a form
  • Adding headers
  • Linking to external content
  • Entering and selecting data
  • Adding charts
  • Creating a main menu
  • Creating a customer form
  • Understanding report structure
  • Building reports from wizards and queries
  • Printing reports
Subjects:
Business Forms Databases
Software:
Access Office
Author:
Adam Wilbert

Adding buttons

Buttons are one of the key interactive elements that you'll use on forms. They instantly tell the end user that something will happen when I click there. Buttons will be linked to either Macros or Visual Basic code to control their behavior. Like the other controls, you add them to reports as well for navigation within your database. But the nice thing about buttons is that they don't print when you print your report. Let's take a look at adding some buttons to my Controls form. I'll right-click on that form in the Navigation pane and choose Design View. The Button control is this one right here, the rectangle at the Xs inside of it. I'll go ahead and click that once and click to add a button to my form.

When I do that the Command Button Wizard starts, and it asks what do I want my button to do? This first section has Categories; the second section has Actions within each category. So for instance, I've got Record Navigation, and I can do Find Next or Find Record or Go To Next Record or Last Record. Under Record Operations I can Add New Records or Delete Records, Print or Save. Under Form Operations I can apply a filter, close or open a form, I can send a form to a printer, or refresh the data. Under Report Operations I can choose to Mail a Report or Print a Report.

The Application category only has one action and that's to Quit Access or quit the entire program, and finally the Miscellaneous category has things like Print a Table or run another Macro. Let's go ahead and choose one of these options. I'm going to go to Form Operations and I'm going to choose Open Form. We'll go ahead and say Next, Access then asks me well, which form do you want to open? I want to open up the Employee Directory; we'll go ahead and say Next. Access asks us if we want to open the form to a specific data or open the form and show all the records. I want to display the entire thing, go ahead and say Next. And finally, what do I want all my button? Do I want Text or do I want a Picture, and if I want a picture, I can browse and find an icon or I can accept the default here.

We'll go ahead and choose Picture, and we'll accept this default one here. Let's go ahead and say Next, and we'll accept the default name for this button and say, Finish. Now I've got a button on my form. I'll go ahead and deselect it, so I can see what it looks like. Now buttons have lots of properties that we can change. For instance, I selected that I wanted an image on my button, but what if I wanted an image and text? Well, I can do that over here in the Format tab for the button. Right now it says Picture Caption Arrangement: No Picture Caption. Let's go ahead and change that to Right; that will add a caption to the right side of my image. Let's make the button a little bit bigger, I'll drag on the right side and I'll make it a little shorter.

Now I can change the text here with the Caption. So instead of just the icon, I can have, say, Open Employee Directory, and again, I'll have to make it a little bigger or I can go to the Format tab and change the font, I'll make it a little smaller, to an 8 point. I can also change the font down here; Font Size is now set to 8. Let's see some other things that we can change with our buttons. I can go up to the Quick Styles button here in the Format tab and choose a style that I like. May be I want to make it look like this green light button. Now it's got a shadow and it's green colored. I can click on the button and take a look at Shape Effects. We can add Shadows or Glow, or Soft Edges, or even make it Beveled.

Now I want to caution you against using some of these especial effects. A lot of times we can just add unnecessary clutter to your forms, they don't actually add anything to the user interface. And I'm going to leave all these alone and let's go back and take a look at some more properties here. Some of the other things that I can do is change the color when the user interacts with it. So for instance, I've got Hover Fore Color right now or Pressed Fore Color, the Hover state is what happens when the mouse moves over the button, the Pressed state is what happens when the user clicks down on the button, we can change both of these. Hover Fore will change the color of the text, so instead of that black color, maybe we'll make the checks change to dark gray.

The Pressed Fore Color will change the color of the text when it's pressed, so instead of black, we'll make it red when it's pressed. The Hover Color and Pressed Color will be at the background of the button. So we'll set the Hover Color may be to a darker green, here, and the Pressed Color, maybe we'll make that red. I'll hit the Build button and I'll choose a nice red. Let's go ahead and see what my button looks like now. I'll go to the Home tab and switch to Form View and now if I hover over the button, you see the color has changed to a gray color. As I hover over it, it changes color and as I click down on it, it changes too. So I can see it's got a light pink background with a red text.

If I click on the button; it's going to open up my Employee Directory, so it's doing exactly what I told it to do. Let's go ahead and close the Employee Directory and we'll switch back into Design View for our Controls form. Now I can control what the button is doing when I click on it from the Event tab in the Property Sheet, when we went to that wizard it was creating this OnClick event which means when I click on it what happens, that runs this in Embedded Macro. I can see what the embedded macro is by clicking the Build button to the right. Or if I have other macros that are already saved in my Navigation pane here, I can use the drop-down menu to select from those. I'll click Build to edit the Embedded Macro. When I went to the Wizard I told that I wanted to open the form, so I created this Openform event.

I also told it what form I wanted to open, so it attached that here. But it didn't ask me some other options, for instance, Window Mode or Data Mode or if I wanted to apply some filtering. So these are additional options that I can choose to add into this Openform Button, for instance, Window Mode, they don't change that to dialog, in which case the Employee Directory would open up as a pop-up menu. Let's go ahead and close this and see what that looks like. I'll return to Form View, and now I'll click on the Button, and the Employee Directory opens as a pop-up menu instead. So buttons provide the main interactive interface through the Access database. They leverage Macros or Visual Basic code to perform the actions, and they're instantly recognizable for your end users.

So when somebody sees a button on a form, they know that they can click on it and that will affect the database.

There are currently no FAQs about Access 2010: Forms and Reports in Depth.

Share a link to this course
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.
Upgrade now


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.

Upgrade now

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
Welcome to the redesigned course page.

We’ve moved some things around, and now you can



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.

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