Visitors to VTC.com will be able to view all introductory videos for each training course.
Free Trial Members will gain access to first three chapters for each training course.
Full Access Members have full access to VTC.com�s entire library of video tutorials.
Welcome to part one, of Using Combo Boxes. Now this is going to be a two part video because I want to show you a couple examples of some of really cool things that you can do, using this Control Wizard, especially with a Combo Box, and this will also kind of tip you off on some other really cool things you can do. Now let's back up all the way back to the beginning of the course, and in video when we set up the students table, and I'm going to right click on the Students table, and open it in Design View, you will remember that on this IID column, that when we added a new student, we needed to link them to an instructor based on the instrument they were going to learn on. And I created a look up field on IID alright? And notice that it selects from the instructor, you know the IID, and the instrument, and it gives us a little box that we can choose from, and so what I'm going to do is close this, and if I just double click this, and open it in Data Sheet View, if you remember, it gives us this neat little drop down. Well that is a look up field, and I just changed Suzy by the way, to guitar, OK? Well that's kind of cool, but look up fields, can be somewhat problematic here, but they're really kind of cool, if you're going to use the Data Sheet View to input your data. Now what I'm going to do here, and I don't want to confuse you, but I want to show you on the student controls form, how I can do the same thing, after the fact, and I'm just going to duplicate this here, but let's just assume that this was not a look up field OK? And when we created our form, using Auto Form, it automatically dropped this on, as this look up field right? But we can add that separate functionality, without using a look up field. Now let's just pretend that this was just your basic field here, that holds the IID alright? We're going to create a separate look up. So what we're going to do, is I'm going to go out into Design View, and I'm going to make sure that the Control Wizard is open, I'm going to grab the Combo Box, and I'm just going to stick it right down here to make it easy for now. Actually, I'll tell you what, I'll put it right over here, by IID, how about that? Now notice that kicks off the Combo Box Wizard. I want the Combo Box to get values from another table or a query, that is exactly what I want it to do, I will click Next, and it says what table do you want to get it from? I want to get it from the instructor table, notice I can get it from queries, or both, and I want to get the IID and the instrument. Now here's the thing you have to watch for OK? The field that becomes the first one here, is the one that's going to get stored somewhere alright? This one is actually kind of look up field, so I'll hit Next, and how do you want to store these? I want to store them by instrument, and I hit Next, and then this is how it's going to look. Now notice, I can hide the Key column which is my primary Key column. I don't want to see that in my look up, and I can pull this over to where the end user can see the instrument ID numbers, and the instruments as well, or I want you to notice something here. I can pull this all the way to the left of where it doesn't appear. It's still there, so the IID is still there, and I can double click that, and make it fit. It's still there, and it still be stored, but I'm just not going to see it. Now when I choose a value in my Combo Box, what I want to have happen, I want to store the value, which is going to be that IID value, OK, in the IID field. And I will hit Next, and it's going to ask me, what do you want to call this? And I will just call this Combo or CB Choose IID alright? And then I will hit Finish, and just like that now, I will go out to Form View, and notice I've got this Label here, don't worry about that for now. Actually, let me go clean that thing off, it's going to drive me nuts. Let me highlight this, and then just right click it, and Delete it, so that, that Labels gone, and now let's go back out to Form View. Now from my look up table, right that I created my look up column, I see these Settings, bass drums, guitar, and notice I can set it to piano, it changes it to one, or I can now use my look up field. And if I set it to bass here, notice it changes it here, alright, and so I could actually drop this from the form, and just use this. And notice that's changing it, just like this would changes. Six is violin, notice five is drums, OK? I'm going to set it to one, and come over here, and if I change it to drums, it changes it to five. I hope this doesn't confuse you, but what I'm trying to say is, don't necessarily use look up fields in the tables, you can always add them later with the Combo Box using the Control Wizard on your forms, alright? So that's the first use of a Combo Box, that's kind of cool, it is just a bit confusing, go through the example a couple of times, get comfortable with it, and then you'll be a pro in no time, alright? Now in the next video, part two, I'm going to show you a different functionality you can use with the Combo Box, that's very, very popular, very cool, and very intuitive for the people using your form, so join me in part two.
| Course: | Microsoft Access 2010 |
| Author: | Mark Long |
| SKU: | 34224 |
| ISBN: | 1-936334-91-7 |
| Release Date: | 2011-05-12 |
| Duration: | 9 hrs / 121 lessons |
| Work Files: |
Yes |
| Captions: | No |
| Compatibility: |
Vista/XP/2000, OS X, Linux QuickTime 7, Flash 8 |