|
|
Step Number 1First, make sure that the Recipes database is open. It should look like the window below. Click on Create Form in Design View. Step Number 2The window that appears should look like the one below. This is the form design window. In this environment, you can build forms by dragging and dropping controls onto the surface of a form, in addition to setting their properties and those of the form. In this case, we are going to create a form for adding ingredients to our database. It will be a simple form with only two fields, but it should demonstrate the basics of creating a form manually. Step Number 3Be sure that the toolbox is visible. If it isn't, click the Toolbox button on the toolbar. You should probably drag the toolbox to a convenient location on the screen, since there is a great deal of work to do. Step Number 4Well, with that handled, we need to set up the form to connect to a table in the database (otherwise, it can't access data). To begin this process, right click on the upper left corner of the Form design window as shown below and select Properties. Step Number 5Notice the window that appears. This is the properties window. It enables you to change the appearance and behaviors of controls and forms. Notice the tabs - they organize the properties of a form or control so that you can find what you are looking for more easily. Also note the combo box near the top of the properties dialog. This allows you to choose which object (control(s) or form) that you are setting the properties of .Step Number 6Click on the Data tab. Choose Record Source and select tblIngredients from the list that drops down. Step Number 7Verify that the properties dialog box looks as displayed, otherwise, it may not work as expected. Step Number 8Look for the button on the toolbar titled Field List. Now that you have specified the table that contains the form's data, you can bring up the field list window to help you add data fields to the form. (Note: I messed up on the screenshot below - if you need to see what the field list window looks like, you need to look at the screenshot for the next step.) Step Number 9Go ahead and drag the fields from the field list window to the surface of the form. Notice that Access automatically sets the fields up and labels them. Not too bad, is it? Step Number 10Now, resize the form design window until the Ingredient ID and Ingredient Name fields don't have so much open space around them. This will make your form smaller, which is really the way that it should be with so few fields. Go to the File menu and select Save As. We are already done designing our form manually. While there is a great deal more you can do by putting your forms together manually, instead of letting the wizard do it for you. More complicated forms can also be developed without using the wizard. Step Number 11Now, we need to give this form a name. Save it as frmIngredients and click Ok. Step Number 12Verify that the form window looks like the screenshot below. Then, click on the View button on the left side of the toolbar to preview the form. Step Number 13Now, you can see that the form is fully functional, without going through all the questions that the wizard gives you. Wasn't that easy? |