We launched a new IT training category! Check out the 140+ courses now.

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

Controlling input with option groups

From: Access 2010: Forms and Reports in Depth

Video: Controlling input with option groups

Yes/No Data Type fields have several different ways that the user can interact with them. The most common is with a Checkbox an Option Button or a Toggle Button. We can also group several of these elements together in what is called an option group to deal with more complex data entry. We are going to continue working with a simple form to capture product reviews that we created in the last movie. I will double-click to open it and we will see that we can select an oil name from this drop-down menu and entering comments here that we want to add to our Review. Let me go ahead and open up this Reviews table. I will double-click on it to open and we will see that the Reviews table also has two fields, one for Rating, here, which is the numerical value and one for Public.

Controlling input with option groups

Yes/No Data Type fields have several different ways that the user can interact with them. The most common is with a Checkbox an Option Button or a Toggle Button. We can also group several of these elements together in what is called an option group to deal with more complex data entry. We are going to continue working with a simple form to capture product reviews that we created in the last movie. I will double-click to open it and we will see that we can select an oil name from this drop-down menu and entering comments here that we want to add to our Review. Let me go ahead and open up this Reviews table. I will double-click on it to open and we will see that the Reviews table also has two fields, one for Rating, here, which is the numerical value and one for Public.

A Checkbox or Yes/No data type that says whether or not we can use the review on our website. I am going to go ahead and close this table down and we will change our format to Design View, here. I am going to go up to the controls up at the top and I am going to use the More button to open that Controls Panel. Now the Checkbox Control is this one right here. This one that looks like an eyeball is our Option button, and over here on the left, is our Toggle button. It's the one with the rectangle and two different states. We are going to add each of these to our form, and then connect them to the Yes/No Public box on the Reviews form. We will click on the checkbox and add one in. I will scroll down and add this Option button here, and I will add one to my form and I will scroll down and add a Toggle button, and I will put that in my form as well.

When you first add these in, they are unbound. They're not connected to this Reviews table in any way. I do need to identify which field this control. I can do that in the Data tab of the Property Sheet. If it's not open, you can toggle the Proper Sheet with this button here or press Alt+Enter or F4. The Control Source field, is this the drop-down menu where I can select the field that I want to connect it to. In this case, I'm going to connect it to Public. And I'm going to connect with radio button and the checkbox to Public as well. Make sure you click on the radio button, not the label; we will go to Control Source and choose Public.

Now I will click on the checkbox, Control Source and Public. So now all of three of these elements are connected to the exact same field. Let's go and take a look at our form. I will change to Form View, and I can see that this first review of 5, the checkbox is turned on. All of these are active. As I scroll through my records, record number 2, it's turned off. If I were to toggle one of them, they'll change state at the same time. That's because they are connected to all, the exact same field in this table. Okay, let's go back in the Design View. I am going to go ahead and get rid of two of these, and the checkbox is the most common option that people are familiar with, so I am actually going to get rid of these other two interface elements.

We are just going to stick with the checkbox. I'm going to change the label for this checkbox to, May we use your comments on the website. I will double-click to edit it and I will move this up below the comments box. Now I want to add a control, so that they can enter any product rating. I could just have type in a value, but some people will type in five stars or three or some other random numbers, so I won't be able to control this a little bit more. What I can do is use what's called an Option Group. Up here in the Control section, the Option Group is this one here with the white rectangle on the XYZ across the top.

I will click that on, and I will just add an Option Group down here. When I do that, the wizard starts. The first thing that it wants to know is what are the labels? These are going to be what the end user sees. So I want to make sure that they are clear. I'm going to put in the five selections that I want them to choose from. The first one is going to be Excellent followed by Good then Average, then Below Average and then Poor. Once I get those five labels typed in, I will go ahead and say Next. The next screen asks if I want to make a default choice. Now I don't want to skew my results at all, so I am going to say no, I don't want to default choice. Go ahead and say Next. And then it wants to know what values do I want to associate with the label? So again, the users are going to see what it says on the label.

The value is what's going to be saved in my data table. I am actually going to want to reverse these numbers, Excellent is going to be a 5 rating, Good will be a 4 rating, Average is 3, Below Average is 2 and Poor is 1. Go ahead and say Next. The last screen is going to ask, do I want to save the value for later use or store the value in a field. So we are connecting this to our Reviews table, so I want to store this in a field and I'm going to connect it to my Ratings field. Go ahead and say Next. We have a choice of how we want this to display; we can either choose an Option button, a Checkbox or a Toggle button. Now in standard User Interface practices, checkboxes typically mean that the user can select multiple options or as an Option button, they can only check one.

So in this instance, I would probably avoid the checkbox. I would either choose the Option button, or the Toggle button. In this case, I'm going to choose the Option button. We can also add a style to the line around the edge here. You can either leave it Etched, Flat, Raised, Sunken or Shadowed, let's go ahead and say Next. Finally, it's going to ask what do I want to name this. This is the title that's going to appear here. Instead of Frame10, I'm going to choose Rating and say Finish. That adds the Option button group to my form. Let's go ahead and rearrange the elements a little bit. I can highlight everything up here. And select them this way and I'll Shift+Click just like those labels.

I'm going to move that up to the top, then I will move all of the rating stuff over to the right side. Finally, I am going to make my form a little bit shorter, so I will scroll at the bottom. I will drag this back up to the top and I am going to change the labels here, instead of Combo3, this is going to be Product. Now I can move these over to align them up a little bit, I will use these handles in the top left, drag them over and we will drop them there. Finally, I'm going to right align the text, so that all the labels are aligned together. We will go in the Format tab, and say right aligned. Okay, let's check out our form, we will go back to Home tab, switch to Form View, and there is our finished form.

I can see that the first review is for this particular oil. This is the comment, it's public and they gave it a rating of Good. I can scroll through the different reviews or I can add my own. We will go to the next blank one, choose a product to review, about the Mission Oil. They can use it on the website, we will give it a good rating and we can type in any comments. We will click this pencil icon to finish the review and we can double-check the table to make sure that it got entered. And it looks like all the values came in. So the Option Group gave us a good way to translate what we want to store in the database, this numerical rating, to a different sort of tag that's presentable to our end users.

So we were able to use a Checkbox and Option button or Toggle button, to interface with the Yes/No Public field here. And we used a Control group to translate the numerical value that we wanted to store on our database, to something that's a little more user-friendly to our end-users, the text tag, of what their rating is.

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 · 14979 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 preferences from 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.