Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
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.
Get unlimited access to all courses for just $25/month.Become a member
82 Video lessons · 74731 Viewers
80 Video lessons · 129836 Viewers
52 Video lessons · 64042 Viewers
59 Video lessons · 49836 Viewers
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
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.
Your file was successfully uploaded.