|
||||||
|
Customer Form 2 Lesson 11: Build a Customer Data Entry Form In Lesson 11, we will walk through building a customer form the right way using Form Design View in Microsoft Access. I will show you how to create a blank new form, set the Record Source to your customer table, add existing fields, resize text boxes and labels, arrange and align controls, and adjust label and background colors. We will discuss basic formatting and layout options, plus tips for organizing fields like city, state, and zip. This lesson offers a preview of more advanced form design topics we will cover in Level 2. NavigationKeywordsAccess Beginner, Form Design View, build a form, Record Source, add existing fields, resize text boxes, change label colors, property sheet, field list, drag and drop fields, text box label, align fields, delete label, move controls, save form, background
IntroIn Lesson 11, we will walk through building a customer form the right way using Form Design View in Microsoft Access. I will show you how to create a blank new form, set the Record Source to your customer table, add existing fields, resize text boxes and labels, arrange and align controls, and adjust label and background colors. We will discuss basic formatting and layout options, plus tips for organizing fields like city, state, and zip. This lesson offers a preview of more advanced form design topics we will cover in Level 2.TranscriptIn lesson 11, we are going to learn the right way to build a form using Form Design View. This is a preview of a lesson that I normally used to cover in Level 2.We will learn about creating a blank new form, setting the Record Source, adding existing fields from the table to the form, resizing objects, your labels and your text boxes, and changing colors. This lesson is new for Beginner Level 1. I used to cover this material in Beginner Level 2, but I said to myself, self, I do not often use Layout View. I almost never use it. So I am going to teach these people from the beginning the right way to build a form. I want to show some people, like I said, who are not planning on doing much with Access, just how to get in there and build a quick form. That is what Layout View is for. That is what we covered in the last lesson. Today, in this lesson, I am going to show you how to use Design View to build forms properly. I have been working with Microsoft Access since version 2.0 came out in 1994. This was the only method available at the time, and this, I think, is the best method for building forms. It is a little more complicated, but stick with it. I am going to repeat this a couple more times. I am still going to spend a lot of time in Level 2 going over form design, because designing forms is very important for your databases. So consider this a sneak preview, a short version of what I am going to cover more in Level 2. Let us build a form the right way: our customer form. Click Create, then Form Design. When you do this, you get a blank form. The first thing we have to do is tell the form where you are getting your data from, because a form can get its data from a table, and we may have multiple tables in here, or a query, and again, we can have multiple queries in here. Open up the form's properties. Where these two ruler bars meet, right in this corner, there is a little block. See that little block right there? Double click on that guy. That will open up the property sheet. Resize it just a little bit, it does not have to be that big. On the Alt-AB, the top property is called Record Source. Select the Record Source property and set it to CustomerT. That tells Access this form is going to get its data from the customer table. That is all you have to do in the property sheet. Close the property sheet now. Now we are going to add fields to our form. On the Design tab, over in the Tools section, find Add Existing Fields. Click on that, which opens up this thing called a field list. Since the form knows it is getting its data from the customer table, you see the fields that exist in that customer table. All you have to do is click and drag these fields off of the field list onto your form. Watch this: click, drag, and drop, and that is it. When you drop the field, you get a text box and a label. When you get the next field, for example, first name, click, drag, line it up with the text box underneath there, and drop it there. If these do not drop exactly where you want them, you can click and drag to move them around. Make sure you leave room for your label. If you go too far, it will squish your label up there. So you do not want to put it right up against the edge. Click and drag. You can drag either one, the label or the text box. Get them right up next to each other just like that. You resize these by clicking on them. Then you see the little border around there. If you move to the corner or the edges, you see the little double arrows. You can click and drag to resize the labels or you can click and drag to resize the text boxes. The customer ID does not have to be that big, so I can make that smaller. First name can be a little bit bigger. Ready to get last name? Click, drag, drop. Usually I like to drop it and then I will move it over here and get it in position and resize it like that. You can change your labels like we did in the last class. Click, just hit the space bar: Last Name. Customer, space, ID, that kind of stuff. These are just labels, they are just for display. You can move them all individually if you want to. But if you want to move a block of them, for example, address, city, state, zip and country altogether, click on the first one. Hold down the Shift key, click on the last one. That selects that whole block. Now click and drag that whole block and drop it there. If you forgot company name, click, drag, and drop company name. You may decide you do not want company name. Press Delete on the keyboard. Just delete it like that. Slide address over here. Address can be bigger. You may decide you want city, state, and zip on the same line. Slide city over there like that. City can be about yay big. Now I want state next to it. I am going to delete the label for state. Click on the label and hit delete. If you delete a text box, the label is also deleted. But you can delete just the label, and it leaves the text box behind. Now I can move state up here like that, resize it, and then zip next to it. You can make these exactly as big or as small as you want. Country can go underneath that like so. Resize country. These are just slightly off. These go out to about there. These do not. Select all of these. Click and drag a box that just touches those. Now I have address, zip, and country selected. I can now resize all of them together. Watch that right there. There are all kinds of layout tricks I am going to show you over the next couple of classes. For city, click. Then input City, State, Zip in the label. City, State, Zip. Let us save this form. Press Control+S to save. Call this CustomerF. There it is. Close it and then reopen it. There is all this empty space in here. Let us get rid of that and make it just this big. How do I do that? Right-click on the title bar and go to Design View. Come out here where the edge is. You see that edge, click and drag. That is the actual width of the form. That is what this ruler dictates up top there. Scroll down to find the bottom of it and slide that up. See that? Slide it up just like that. Make it fit exactly how big you want it to be to fit these fields. Save it, close it, and then reopen it. You can have just the information on here that you want. You do not have to have all the information. In Level 2 we will build a nice, big, pretty customer form. Just like this one I showed you before. This guy here, very similar. Again, this is just a quick preview. Back to Design View: right-click, Design View. Let us add a little bit of color. Click on the background of the form. Come up top to Format. Here you can change the background color of the form. Let us go light purple, like that. Or maybe light blue. Light blue looks better like that. I like to stick to the standard colors. We are going to talk about theme colors and standard colors in a future class. But I like to stick to the standard colors because the theme colors can change if the user changes the theme. That can also be a con. It can make your database look like you do not want it to look if someone changes your theme. You can also change the label colors. Now I am going to select all of them. I am going to come right up here in the ruler bar, click and drag. That is going to select all of them. Now I am going to change the foreground color to black so they are more easily read. One more thing I like to do, since the customer ID is an autonumber and it cannot be changed, I like to make that gray background. That just visually signals the user: hey, you cannot change that. Save it, close it, open it back up again. It is already starting to look really cool. This is just, as I said, a sneak preview. We are going to spend a lot of time in Level 2 going over form design. Most of Level 2 is form design. I am going to show you lots more tricks to make this look professional. Over the past I do not know how many years, I have been saying to myself that in Level 1, I really should show them at least the basics of how to use form design because I do not really use Layout View myself at all. There are a couple of tricks that I do with Layout View, but that is it. 99 percent of the time when I am working with forms, I am in Design View. So I figured I have to show the beginners that. We are going to do more with this in Level 2 and we are going to be building lots and lots of different kinds of forms: contact form, order form, order details form, products forms, all kinds of different forms over the course of the course. I hope you learned something there. QuizQ1. What is the primary view recommended in this lesson for building forms in Microsoft Access?A. Design View B. Layout View C. Datasheet View D. Form View Q2. What is the purpose of the Record Source property when creating a new form? A. It determines the theme color of the form B. It tells the form which table or query to get its data from C. It sets the default layout style D. It controls the background image Q3. How do you open the form's property sheet in Design View? A. Right-click anywhere on the form B. Double-click the small block where the rulers meet in the corner C. Click File and then Properties D. Click on the text box for the first field Q4. After setting the Record Source, how do you add fields from your table to the form? A. Enter field names manually B. Use the Add Existing Fields button and drag fields onto the form C. Import fields from an Excel file D. Right-click and choose Add Field Q5. If you want to move a group of controls (such as Address, City, State, Zip), what should you do? A. Click each one individually and drag them one at a time B. Use Shift to select a block and then drag them together C. Use Ctrl+Alt+Drag to select them D. Select and copy them to a new form Q6. What happens if you delete a text box on the form? A. Only the text box is deleted B. Both the text box and its label are deleted C. The field is removed from the table D. Nothing; the text box reappears Q7. How can you change the background color of the entire form? A. Select the form background, go to Format, and choose a color B. Modify the Record Source property C. Edit the table design D. Resize the form Q8. Why does the instructor prefer using standard colors over theme colors for form design? A. Standard colors look more professional B. Theme colors are outdated C. Theme colors can change if the user changes the theme, affecting the form's appearance D. Standard colors are automatic Q9. How do you visually indicate that the Customer ID field cannot be changed? A. Make it bold B. Change its background color to red C. Change its background color to gray D. Hide the field Q10. What keyboard shortcut is used to save the form? A. Ctrl+C B. Ctrl+V C. Ctrl+S D. Ctrl+F Q11. If you need to reduce the empty space on your form, what should you do? A. Change the Record Source B. Drag the form's edge inward in Design View C. Add more fields to fill the space D. Use Layout View to auto-fit Answers: 1-A; 2-B; 3-B; 4-B; 5-B; 6-B; 7-A; 8-C; 9-C; 10-C; 11-B DISCLAIMER: Quiz questions are AI generated. If you find any that are wrong, don't make sense, or aren't related to the video topic at hand, then please post a comment and let me know. Thanks. SummaryToday's video from Access Learning Zone is all about the proper way to build forms using the Form Design View in Microsoft Access. This lesson is actually a preview of material I usually cover in Level 2 of my courses, but I have decided to introduce these concepts a little earlier because I believe Design View is the best approach when working with forms.In our last lesson, we focused on Layout View, which is handy if you just need to build a quick form and are not planning to do much with Access. Layout View serves that purpose well. However, for those of you who plan to use Access more extensively or want more control over your forms, I want to show you how to use Design View from the start. Personally, I have been using Access since version 2.0 back in 1994, and Design View has always been my preferred method for building quality forms. To get started, we'll create a customer form using Form Design. Begin by creating a blank new form. The first and most important step is to set the Record Source, which tells Access where to get the data for this form. Forms in Access can pull data from a table or a query, and you may have several of each in your database, so specifying the correct source is crucial. Open the property's sheet for the form and set the Record Source to 'CustomerT' so this form knows to display data from the customer table. Once that's done, you can close the property sheet. The next step is adding fields from the table to the form. Use the Add Existing Fields feature to bring up a list of all available fields in your customer table. You can then drag and drop the fields onto your form. Each time you add a field, both a text box and a label will appear. Make sure you line up each new field under the previous one and adjust the position as needed so everything stays organized. Ensure there is enough space for the labels so they don't get pushed into the edge of the form. You can move labels and text boxes around to line things up the way you like. To adjust the size of the labels or text boxes, select them and drag the borders to resize. For example, the Customer ID field doesn't have to be very wide, so it can be made smaller, while the First Name field might need to be larger. Continue adding fields such as Last Name, Address, City, State, Zip, and Country. You can rename your labels by selecting them and editing the text to something that makes more sense, such as changing 'LastName' to 'Last Name' or 'CustomerID' to 'Customer ID'. If you want to move several fields at once, select the first field, hold Shift, and select the last one to highlight a block of controls. You can then move and reposition them together. If you make a mistake and want to remove a field or label, simply delete it and move the remaining ones to fill the space. Sometimes you may want certain fields on the same line. For example, City, State, and Zip can be arranged side by side. You can move and resize each control individually. Deleting a label does not remove the associated text box, but deleting a text box will delete its label as well. To tidy up your layout, you can select multiple controls by dragging a selection box over them and resizing or moving them together. This is helpful when you want columns to align perfectly. Once you're happy with the arrangement, remember to save your form, perhaps as 'CustomerF'. After saving, you might notice extra space in the form. To make the form more compact, adjust the width and height by dragging the edges inward until it fits your controls nicely. For a finishing touch, you can change the form's background color by selecting the background and choosing a color from the Format options. I recommend using standard colors rather than theme colors, as theme colors can change depending on user preferences and might cause your database to look different than expected. You can also change the color of your labels. Select them all and set the foreground color to something like black for better readability. I also like to make the Customer ID text box background gray to indicate that it cannot be modified by users, as it's an autonumber field. This has been just a quick overview of how to build a form the right way using Design View. There is a lot more to cover when it comes to making professional-looking forms, and most of Level 2 will focus on form design. I'll show you many more tricks for building contact forms, order forms, product forms, and so on as you progress through the course. If you've been following Level 1 so far, this is a good introduction to working in Design View, and as you continue, you'll see why I rarely use Layout View myself. Nearly all of my form work happens in Design View because of the control it provides. You can find a complete video tutorial with step-by-step instructions on everything discussed here on my website at the link below. Live long and prosper, my friends. Topic ListCreating a new blank form in Design ViewSetting the Record Source for a form Opening and using the form Property Sheet Adding existing fields from a table to a form Dragging and aligning text boxes and labels Resizing text boxes and labels Renaming and editing labels Selecting and moving multiple controls at once Deleting fields and labels from a form Arranging fields on the same line (city, state, zip) Adjusting form size to fit controls Changing form background color Changing label text color Using color to indicate uneditable fields Saving and naming a form ArticleToday we are going to learn the right way to build a form in Microsoft Access using Form Design View. While Access provides more than one way to create a form, I recommend using Design View, especially if you want greater control and flexibility. This tutorial will walk you through the process step by step, so you can build a form properly and customize it as needed.To begin, open your Access database and click on Create, then select Form Design. This will give you a completely blank form to start from scratch. The very first thing you need to do is tell Access where your data is coming from, because a form can pull its data from a table or a query. Since databases often have several tables and queries, you need to specify the correct source. To set the data source, open the property sheet for the form. You can do this by double-clicking the small box in the corner where the horizontal and vertical rulers meet. If you do not see the property sheet, that method will bring it up. Look for the property named Record Source at the top. Click in the Record Source field and select the table you want the form to use, for example CustomerT. That tells Access to pull data from the customer table. Once you have updated the Record Source, you can close the property sheet. Next, you need to add fields to your form. On the Design tab, look in the Tools section for Add Existing Fields. Click it to bring up the field list, which shows all the fields available in your Record Source. To add fields to your form, simply click and drag a field from the list onto the form. When you do this, Access creates a pair of controls for each field: a label for the field name and a text box for the data. Start with something like CustomerID. Drag it over and drop it onto the form. Then bring over other fields - for example, drag FirstName and align its text box beneath the one above. If a field does not drop exactly where you want it, you can move it: click and drag the label or the text box to the correct spot. Make sure to leave enough room for each label. If you put them too close together, the labels may overlap, so try to space things neatly. You can resize labels and text boxes by clicking on them. When you do so, a border with sizing handles appears around the selected item. Move your cursor to a corner or edge to see a double arrow, and then click and drag to make the control larger or smaller. For example, you might shrink the CustomerID text box, since it does not need much space, or expand FirstName to allow more letters. Continue dragging the rest of your fields onto the form, such as LastName, Address, City, State, Zip, and Country. Each time, position and resize the controls for a neat layout. If you need to adjust the label, you can just click on it and type in a new caption - for instance, change LastName to just Last Name or update CustomerID to Customer ID. When you have several controls to move, you can select a block of them all at once: click the first, hold down the Shift key, click the last, and then click and drag to move the whole selection as a group. You might want to arrange Address, City, State, Zip, and Country in a block, move them together, and adjust as needed. Sometimes you will want to put multiple fields on the same line. For example, you might put City, State, and Zip all on one line. To do this, drag City into position, then delete the label for State (that is, click the label and press Delete), and move the State text box next to City. Then bring Zip alongside, resizing each as necessary. If you remove a text box, the label is deleted as well, but you can remove just the label without affecting the data box. If you want to select several controls at once for resizing or moving, click and drag a selection box so it touches the controls you want to adjust. This makes it easy to resize several controls to the same width, ensuring everything lines up neatly. For example, select Address, Zip, and Country together and resize them as a group. Once your fields are laid out as you like, give your form a name and save it. Press Control+S, then type CustomerF, and click OK. Close and reopen the form to see the effect. You might notice a lot of empty space around your fields. To fix this, go back to Design View by right-clicking the form title bar and selecting Design View. Then, click and drag the form edges to fit your content. Use the horizontal and vertical rulers along the top and side to judge the width and height. Scroll down if necessary, and drag the lower edge of the form up to get rid of empty space. After resizing, save and close, then open the form to see the more compact layout. You are not limited to showing every field. Include only the information you want. Later, you can expand or update your forms as your database grows. To make your form more visually appealing, you can add color. In Design View, click the blank area of the form's background, then go to the Format tab. There you can change the background color. For example, you might pick a light blue or purple background. I recommend sticking to standard colors, which will stay consistent regardless of which theme users choose for their Access program. You can also update the labels for better legibility. To select all the labels, click and drag across the labels in the ruler bar area. Once selected, change the foreground color to black or another easy-to-read color. Since CustomerID is usually an autonumber field that cannot be edited, it is helpful to signal to users that the field is read-only. One way to do this is to set the background color of the CustomerID text box to gray. This visual cue tells users they cannot change that box. After you are done adjusting colors and fields, save and close your form, then open it again to check your changes. Now you have a basic, well-organized form that is both functional and easy to use. Designing forms well is important because a good form makes your database much easier to navigate and keeps your data entry process efficient and user-friendly. As you get more comfortable with Form Design View, you will learn to add advanced features such as tab controls, buttons, and calculated fields. For now, practice these basics to become familiar with building and formatting forms. As you progress, you will find yourself using Design View more and more, since it gives you the most control over how your forms look and function. With these techniques, you are ready to start building robust and professional-looking forms in Access right away. |
||
|
| |||
| Keywords: Access Beginner, Form Design View, build a form, Record Source, add existing fields, resize text boxes, change label colors, property sheet, field list, drag and drop fields, text box label, align fields, delete label, move controls, save form, background PermaLink How To Build a Customer Data Entry Form Using Form Design View in Microsoft Access |